
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>matminer.featurizers package &#8212; matminer 0.5.4 documentation</title>
    <link rel="stylesheet" href="_static/nature.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
 
<link href='https://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'>

  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">matminer 0.5.4 documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="matminer-featurizers-package">
<h1>matminer.featurizers package<a class="headerlink" href="#matminer-featurizers-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="subpackages">
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="matminer.featurizers.tests.html">matminer.featurizers.tests package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.tests.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.tests.html#module-matminer.featurizers.tests.test_bandstructure">matminer.featurizers.tests.test_bandstructure module</a></li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.tests.html#matminer-featurizers-tests-test-base-module">matminer.featurizers.tests.test_base module</a></li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.tests.html#module-matminer.featurizers.tests.test_composition">matminer.featurizers.tests.test_composition module</a></li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.tests.html#module-matminer.featurizers.tests.test_conversions">matminer.featurizers.tests.test_conversions module</a></li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.tests.html#module-matminer.featurizers.tests.test_dos">matminer.featurizers.tests.test_dos module</a></li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.tests.html#module-matminer.featurizers.tests.test_function">matminer.featurizers.tests.test_function module</a></li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.tests.html#module-matminer.featurizers.tests.test_site">matminer.featurizers.tests.test_site module</a></li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.tests.html#module-matminer.featurizers.tests.test_structure">matminer.featurizers.tests.test_structure module</a></li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.tests.html#module-matminer.featurizers.tests">Module contents</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="matminer.featurizers.utils.html">matminer.featurizers.utils package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.utils.html#subpackages">Subpackages</a><ul>
<li class="toctree-l3"><a class="reference internal" href="matminer.featurizers.utils.tests.html">matminer.featurizers.utils.tests package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="matminer.featurizers.utils.tests.html#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="matminer.featurizers.utils.tests.html#module-matminer.featurizers.utils.tests.test_cgcnn">matminer.featurizers.utils.tests.test_cgcnn module</a></li>
<li class="toctree-l4"><a class="reference internal" href="matminer.featurizers.utils.tests.html#module-matminer.featurizers.utils.tests.test_grdf">matminer.featurizers.utils.tests.test_grdf module</a></li>
<li class="toctree-l4"><a class="reference internal" href="matminer.featurizers.utils.tests.html#module-matminer.featurizers.utils.tests.test_stats">matminer.featurizers.utils.tests.test_stats module</a></li>
<li class="toctree-l4"><a class="reference internal" href="matminer.featurizers.utils.tests.html#module-matminer.featurizers.utils.tests">Module contents</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.utils.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.utils.html#module-matminer.featurizers.utils.cgcnn">matminer.featurizers.utils.cgcnn module</a></li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.utils.html#module-matminer.featurizers.utils.grdf">matminer.featurizers.utils.grdf module</a></li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.utils.html#module-matminer.featurizers.utils.stats">matminer.featurizers.utils.stats module</a></li>
<li class="toctree-l2"><a class="reference internal" href="matminer.featurizers.utils.html#module-matminer.featurizers.utils">Module contents</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-matminer.featurizers.bandstructure">
<span id="matminer-featurizers-bandstructure-module"></span><h2>matminer.featurizers.bandstructure module<a class="headerlink" href="#module-matminer.featurizers.bandstructure" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="matminer.featurizers.bandstructure.BandFeaturizer">
<em class="property">class </em><code class="descclassname">matminer.featurizers.bandstructure.</code><code class="descname">BandFeaturizer</code><span class="sig-paren">(</span><em>kpoints=None</em>, <em>find_method='nearest'</em>, <em>nbands=2</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.bandstructure.BandFeaturizer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Featurizes a pymatgen band structure object.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>kpoints ([1x3 numpy array]): list of fractional coordinates of</dt>
<dd>k-points at which energy is extracted.</dd>
<dt>find_method (str): the method for finding or interpolating for energy</dt>
<dd><p class="first">at given kpoints. It does nothing if kpoints is None.
options are:</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>‘nearest’: the energy of the nearest available k-point to</dt>
<dd>the input k-point is returned.</dd>
</dl>
<p>‘linear’: the result of linear interpolation is returned
see the documentation for scipy.interpolate.griddata</p>
</div></blockquote>
</dd>
</dl>
<p class="last">nbands (int): the number of valence/conduction bands to be featurized</p>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.bandstructure.BandFeaturizer.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>kpoints=None</em>, <em>find_method='nearest'</em>, <em>nbands=2</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.bandstructure.BandFeaturizer.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.bandstructure.BandFeaturizer.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.bandstructure.BandFeaturizer.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.bandstructure.BandFeaturizer.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.bandstructure.BandFeaturizer.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.bandstructure.BandFeaturizer.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>bs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.bandstructure.BandFeaturizer.featurize" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>bs (pymatgen BandStructure or BandStructureSymmLine or their dict):</dt>
<dd>The band structure to featurize. To obtain all features, bs
should include the structure attribute.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd><blockquote class="first">
<div><dl class="docutils">
<dt>([float]): a list of band structure features. If not bs.structure,</dt>
<dd>features that require the structure will be returned as NaN.</dd>
</dl>
</div></blockquote>
<dl class="last docutils">
<dt>List of currently supported features:</dt>
<dd><p class="first">band_gap (eV): the difference between the CBM and VBM energy
is_gap_direct (0.0|1.0): whether the band gap is direct or not
direct_gap (eV): the minimum direct distance of the last</p>
<blockquote>
<div>valence band and the first conduction band</div></blockquote>
<dl class="docutils">
<dt>p_ex1_norm (float): k-space distance between Gamma point</dt>
<dd>and k-point of VBM</dd>
<dt>n_ex1_norm (float): k-space distance between Gamma point</dt>
<dd>and k-point of CBM</dd>
</dl>
<p>p_ex1_degen: degeneracy of VBM
n_ex1_degen: degeneracy of CBM
if kpoints is provided (e.g. for kpoints == [[0.0, 0.0, 0.0]]):</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>n_0.0;0.0;0.0_en: (energy of the first conduction band at</dt>
<dd>[0.0, 0.0, 0.0] - CBM energy)</dd>
<dt>p_0.0;0.0;0.0_en: (energy of the last valence band at</dt>
<dd>[0.0, 0.0, 0.0] - VBM energy)</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.bandstructure.BandFeaturizer.get_bindex_bspin">
<em class="property">static </em><code class="descname">get_bindex_bspin</code><span class="sig-paren">(</span><em>extremum</em>, <em>is_cbm</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.bandstructure.BandFeaturizer.get_bindex_bspin" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the band index and spin of band extremum</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>extremum (dict): dictionary containing the CBM/VBM, i.e. output of</dt>
<dd>Bandstructure.get_cbm()</dd>
</dl>
<p class="last">is_cbm (bool): whether the extremum is the CBM or not</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.bandstructure.BandFeaturizer.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.bandstructure.BandFeaturizer.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.bandstructure.BranchPointEnergy">
<em class="property">class </em><code class="descclassname">matminer.featurizers.bandstructure.</code><code class="descname">BranchPointEnergy</code><span class="sig-paren">(</span><em>n_vb=1</em>, <em>n_cb=1</em>, <em>calculate_band_edges=True</em>, <em>atol=1e-05</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.bandstructure.BranchPointEnergy" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Branch point energy and absolute band edge position.</p>
<p>Calculates the branch point energy and (optionally) an absolute band
edge position assuming the branch point energy is the center of the gap</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">n_vb (int): number of valence bands to include in BPE calc
n_cb (int): number of conduction bands to include in BPE calc
calculate_band_edges: (bool) whether to also return band edge</p>
<blockquote>
<div>positions</div></blockquote>
<dl class="last docutils">
<dt>atol (float): absolute tolerance when finding equivalent fractional</dt>
<dd>k-points in irreducible brillouin zone (IBZ) when weights is None</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.bandstructure.BranchPointEnergy.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>n_vb=1</em>, <em>n_cb=1</em>, <em>calculate_band_edges=True</em>, <em>atol=1e-05</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.bandstructure.BranchPointEnergy.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.bandstructure.BranchPointEnergy.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.bandstructure.BranchPointEnergy.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.bandstructure.BranchPointEnergy.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.bandstructure.BranchPointEnergy.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns ([str]): absolute energy levels as provided in the input</dt>
<dd>BandStructure. “absolute” means no reference energy is subtracted
from branch_point_energy, vbm or cbm.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.bandstructure.BranchPointEnergy.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>bs</em>, <em>target_gap=None</em>, <em>weights=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.bandstructure.BranchPointEnergy.featurize" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">bs (BandStructure): Uniform (not symm line) band structure
target_gap (float): if set the band gap is scissored to match this</p>
<blockquote>
<div>number</div></blockquote>
<dl class="last docutils">
<dt>weights ([float]): if set, its length has to be equal to bs.kpoints</dt>
<dd>to explicitly determine the k-point weights when averaging</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>(int) branch point energy on same energy scale as BS eigenvalues</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.bandstructure.BranchPointEnergy.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.bandstructure.BranchPointEnergy.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-matminer.featurizers.base">
<span id="matminer-featurizers-base-module"></span><h2>matminer.featurizers.base module<a class="headerlink" href="#module-matminer.featurizers.base" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="matminer.featurizers.base.BaseFeaturizer">
<em class="property">class </em><code class="descclassname">matminer.featurizers.base.</code><code class="descname">BaseFeaturizer</code><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.base.BaseEstimator</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">sklearn.base.TransformerMixin</span></code></p>
<p>Abstract class to calculate features from raw materials input data
such a compound formula or a pymatgen crystal structure or
bandstructure object.</p>
<p>## Using a BaseFeaturizer Class</p>
<p>There are multiple ways for running the featurize routines:</p>
<blockquote>
<div><p><cite>featurize</cite>: Featurize a single entry
<cite>featurize_many</cite>: Featurize a list of entries
<cite>featurize_dataframe</cite>: Compute features for many entries, store results</p>
<blockquote>
<div>as columns in a dataframe</div></blockquote>
</div></blockquote>
<p>Some featurizers require first calling the <cite>fit</cite> method before the
featurization methods can function. Generally, you pass the dataset to
fit to determine which features a featurizer should compute. For example,
a featurizer that returns the partial radial distribution function
may need to know which elements are present in a dataset.</p>
<p>You can also employ the featurizer as part of a ScikitLearn Pipeline object.
For these cases, ScikitLearn calls the <cite>transform</cite> function of the
<cite>BaseFeaturizer</cite> which is a less-featured wrapper of <cite>featurize_many</cite>. You
would then provide your input data as an array to the Pipeline, which would
output the features as an array.</p>
<p>Beyond the featurizing capability, BaseFeaturizer also includes methods
for retrieving proper references for a featurizer. The <cite>citations</cite> function
returns a list of papers that should be cited. The <cite>implementors</cite> function
returns a list of people who wrote the featurizer, so that you know
who to contact with questions.</p>
<p>## Implementing a New BaseFeaturizer Class</p>
<dl class="docutils">
<dt>These operations must be implemented for each new featurizer:</dt>
<dd><dl class="first docutils">
<dt><cite>featurize</cite> - Takes a single material as input, returns the features of</dt>
<dd>that material.</dd>
<dt><cite>feature_labels</cite> - Generates a human-meaningful name for each of the</dt>
<dd>features.</dd>
</dl>
<p><cite>citations</cite> - Returns a list of citations in BibTeX format
<cite>implementors</cite> - Returns a list of people who contributed to writing a</p>
<blockquote class="last">
<div>paper.</div></blockquote>
</dd>
</dl>
<p>None of these operations should change the state of the featurizer. I.e.,
running each method twice should not produce different results, no class
attributes should be changed, and running one operation should not affect
the output of another.</p>
<p>All options of the featurizer must be set by the <cite>__init__</cite> function. All
options must be listed as keyword arguments with default values, and the
value must be saved as a class attribute with the same name (e.g., argument
<cite>n</cite> should be stored in <cite>self.n</cite>). These requirements are necessary for
compatibility with the <cite>get_params</cite> and <cite>set_params</cite> methods of
<cite>BaseEstimator</cite>, which enable easy interoperability with ScikitLearn</p>
<p>Depending on the complexity of your featurizer, it may be worthwhile to
implement a <cite>from_preset</cite> class method. The <cite>from_preset</cite> method takes the
name of a preset and returns an instance of the featurizer with some
hard-coded set of inputs. The <cite>from_preset</cite> option is particularly useful
for defining the settings used by papers in the literature.</p>
<p>Optionally, you can implement the <cite>fit</cite> operation if there are attributes of
your featurizer that must be set for the featurizer to work. Any variables
that are set by fitting should be stored as class attributes that end with
an underscore. (This follows the pattern used by ScikitLearn).</p>
<p>Another option to consider is whether it is worth making any utility
operations for your featurizer. <cite>featurize</cite> must return a list of features,
but this may not be the most natural representation for your features (e.g.,
a <cite>dict</cite> could be better). Making a separate function for computing features
in this natural representation and having the <cite>featurize</cite> function call this
method and then convert the data into a list is a recommended approach.
Users who want to compute the representation in the natural form can use the
utility function and users who want the data in a ML-ready format (list) can
call <cite>featurize</cite>. See <cite>PartialRadialDistributionFunction</cite> for an example of
this concept.</p>
<p>An additional factor to consider is the chunksize for data parallelisation.
For lightweight computational tasks, the overhead associated with passing
data from <cite>multiprocessing.Pool.map()</cite> to the function being parallelised
can increase the time taken for all tasks to be completed. By setting
the <cite>self._chunksize</cite> argument, the overhead associated with passing data
to the tasks can be reduced. Note that there is only an advantage to using
chunksize when the time taken to pass the data from <cite>map</cite> to the function
call is within several orders of magnitude to that of the function call
itself. By default, we allow the Python multiprocessing library to determine
the chunk size automatically based on the size of the list being featurized.
You may want to specify a small chunk size for computationally-expensive
featurizers, which will enable better distribution of taks across threads.
In contrast, for more lightweight featurizers, it is recommended that
the implementor trial a range of chunksize values to find the optimum.
As a general rule of thumb, if the featurize function takes 0.1 seconds or
less, a chunksize of around 30 will perform best.</p>
<p>## Documenting a BaseFeaturizer</p>
<p>The class documentation for each featurizer must contain a description of
the options and the features that will be computed. The options of the class
must all be defined in the <cite>__init__</cite> function of the class, and we
recommend documenting them using the
[Google style](<a class="reference external" href="https://google.github.io/styleguide/pyguide.html">https://google.github.io/styleguide/pyguide.html</a>).</p>
<p>For auto-generated documentation purposes, the first line of the featurizer
doc should come under the class declaration (not under __init__) and should
be a one line summary of the featurizer.</p>
<p>We recommend starting the class documentation with a high-level overview of
the features. For example, mention what kind of characteristics of the
material they describe and refer the reader to a paper that describes these
features well (use a hyperlink if possible, so that the readthedocs will
link to that paper). Then, describe each of the individual features in a
block named “Features”. It is necessary here to give the user enough
information for user to map a feature name what it means. The objective in
this part is to allow people to understand what each column of their
dataframe is without having to read the Python code. You do not need to
explain all of the math/algorithms behind each feature for them to be able
to reproduce the feature, just to get an idea what it is.</p>
<dl class="attribute">
<dt id="matminer.featurizers.base.BaseFeaturizer.chunksize">
<code class="descname">chunksize</code><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.chunksize" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.BaseFeaturizer.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.BaseFeaturizer.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.BaseFeaturizer.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>*x</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.BaseFeaturizer.featurize_dataframe">
<code class="descname">featurize_dataframe</code><span class="sig-paren">(</span><em>df</em>, <em>col_id</em>, <em>ignore_errors=False</em>, <em>return_errors=False</em>, <em>inplace=True</em>, <em>multiindex=False</em>, <em>pbar=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.featurize_dataframe" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute features for all entries contained in input dataframe.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">df (Pandas dataframe): Dataframe containing input data.
col_id (str or list of str): column label containing objects to</p>
<blockquote>
<div>featurize. Can be multiple labels if the featurize function
requires multiple inputs.</div></blockquote>
<dl class="docutils">
<dt>ignore_errors (bool): Returns NaN for dataframe rows where</dt>
<dd>exceptions are thrown if True. If False, exceptions
are thrown as normal.</dd>
<dt>return_errors (bool). Returns the errors encountered for each</dt>
<dd>row in a separate <cite>XFeaturizer errors</cite> column if True. Requires
ignore_errors to be True.</dd>
</dl>
<p>inplace (bool): Whether to add new columns to input dataframe (df)
multiindex (bool): If True, use a Featurizer - Feature 2-level</p>
<blockquote>
<div>index using the MultiIndex capabilities of pandas. If done
inplace, multiindex featurization will overwrite the original
dataframe’s column index.</div></blockquote>
<p class="last">pbar (bool): Shows a progress bar if True.</p>
</dd>
<dt>Returns:</dt>
<dd>updated dataframe.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.BaseFeaturizer.featurize_many">
<code class="descname">featurize_many</code><span class="sig-paren">(</span><em>entries</em>, <em>ignore_errors=False</em>, <em>return_errors=False</em>, <em>pbar=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.featurize_many" title="Permalink to this definition">¶</a></dt>
<dd><p>Featurize a list of entries.</p>
<p>If <cite>featurize</cite> takes multiple inputs, supply inputs as a list of tuples.</p>
<p>Featurize_many supports entries as a list, tuple, numpy array,
Pandas Series, or Pandas DataFrame.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">entries (list-like object): A list of entries to be featurized.
ignore_errors (bool): Returns NaN for entries where exceptions are</p>
<blockquote>
<div>thrown if True. If False, exceptions are thrown as normal.</div></blockquote>
<dl class="docutils">
<dt>return_errors (bool): If True, returns the feature list as</dt>
<dd>determined by ignore_errors with traceback strings added
as an extra ‘feature’. Entries which featurize without
exceptions have this extra feature set to NaN.</dd>
</dl>
<p class="last">pbar (bool): Show a progress bar for featurization if True.</p>
</dd>
<dt>Returns:</dt>
<dd>(list) features for each entry.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.BaseFeaturizer.featurize_wrapper">
<code class="descname">featurize_wrapper</code><span class="sig-paren">(</span><em>x</em>, <em>return_errors=False</em>, <em>ignore_errors=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.featurize_wrapper" title="Permalink to this definition">¶</a></dt>
<dd><p>An exception wrapper for featurize, used in featurize_many and
featurize_dataframe. featurize_wrapper changes the behavior of featurize
when ignore_errors is True in featurize_many/dataframe.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">x: input data to featurize (type depends on featurizer).
ignore_errors (bool): Returns NaN for entries where exceptions are</p>
<blockquote>
<div>thrown if True. If False, exceptions are thrown as normal.</div></blockquote>
<dl class="last docutils">
<dt>return_errors (bool): If True, returns the feature list as</dt>
<dd>determined by ignore_errors with traceback strings added
as an extra ‘feature’. Entries which featurize without
exceptions have this extra feature set to NaN.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.BaseFeaturizer.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>X</em>, <em>y=None</em>, <em>**fit_kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Update the parameters of this featurizer based on available data</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>X - [list of tuples], training data</dd>
<dt>Returns:</dt>
<dd>self</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.BaseFeaturizer.fit_featurize_dataframe">
<code class="descname">fit_featurize_dataframe</code><span class="sig-paren">(</span><em>df</em>, <em>col_id</em>, <em>fit_args=None</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.fit_featurize_dataframe" title="Permalink to this definition">¶</a></dt>
<dd><p>The dataframe equivalent of fit_transform. Takes a dataframe and
column id as input, fits the featurizer to that dataframe, and
returns a featurized dataframe. Accepts the same arguments as
featurize_dataframe.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">df (Pandas dataframe): Dataframe containing input data.
col_id (str or list of str): column label containing objects to</p>
<blockquote>
<div>featurize. Can be multiple labels if the featurize function
requires multiple inputs.</div></blockquote>
<p class="last">fit_args (list): list of arguments for fit function.</p>
</dd>
<dt>Returns:</dt>
<dd>updated dataframe based on featurizer fitted to that dataframe.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.BaseFeaturizer.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="matminer.featurizers.base.BaseFeaturizer.n_jobs">
<code class="descname">n_jobs</code><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.n_jobs" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.BaseFeaturizer.set_chunksize">
<code class="descname">set_chunksize</code><span class="sig-paren">(</span><em>chunksize</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.set_chunksize" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the chunksize used for Pool.map parallelisation.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.BaseFeaturizer.set_n_jobs">
<code class="descname">set_n_jobs</code><span class="sig-paren">(</span><em>n_jobs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.set_n_jobs" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the number of threads for this</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.BaseFeaturizer.transform">
<code class="descname">transform</code><span class="sig-paren">(</span><em>X</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.BaseFeaturizer.transform" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute features for a list of inputs</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.base.MultipleFeaturizer">
<em class="property">class </em><code class="descclassname">matminer.featurizers.base.</code><code class="descname">MultipleFeaturizer</code><span class="sig-paren">(</span><em>featurizers</em>, <em>iterate_over_entries=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.MultipleFeaturizer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Class to run multiple featurizers on the same input data.</p>
<p>All featurizers must take the same kind of data as input
to the featurize function.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">featurizers (list of BaseFeaturizer): A list of featurizers to run.
iterate_over_entries (bool): Whether to iterate over the entries or</p>
<blockquote class="last">
<div>featurizers. Iterating over entries will enable increased caching
but will only display a single progress bar for all featurizers.
If set to False, iteration will be performed over featurizers,
resulting in reduced caching but individual progress bars for each
featurizer.</div></blockquote>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.base.MultipleFeaturizer.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>featurizers</em>, <em>iterate_over_entries=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.MultipleFeaturizer.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.MultipleFeaturizer.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.MultipleFeaturizer.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.MultipleFeaturizer.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.MultipleFeaturizer.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.MultipleFeaturizer.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>*x</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.MultipleFeaturizer.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.MultipleFeaturizer.featurize_many">
<code class="descname">featurize_many</code><span class="sig-paren">(</span><em>entries</em>, <em>ignore_errors=False</em>, <em>return_errors=False</em>, <em>pbar=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.MultipleFeaturizer.featurize_many" title="Permalink to this definition">¶</a></dt>
<dd><p>Featurize a list of entries.</p>
<p>If <cite>featurize</cite> takes multiple inputs, supply inputs as a list of tuples.</p>
<p>Featurize_many supports entries as a list, tuple, numpy array,
Pandas Series, or Pandas DataFrame.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">entries (list-like object): A list of entries to be featurized.
ignore_errors (bool): Returns NaN for entries where exceptions are</p>
<blockquote>
<div>thrown if True. If False, exceptions are thrown as normal.</div></blockquote>
<dl class="docutils">
<dt>return_errors (bool): If True, returns the feature list as</dt>
<dd>determined by ignore_errors with traceback strings added
as an extra ‘feature’. Entries which featurize without
exceptions have this extra feature set to NaN.</dd>
</dl>
<p class="last">pbar (bool): Show a progress bar for featurization if True.</p>
</dd>
<dt>Returns:</dt>
<dd>(list) features for each entry.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.MultipleFeaturizer.featurize_wrapper">
<code class="descname">featurize_wrapper</code><span class="sig-paren">(</span><em>x</em>, <em>return_errors=False</em>, <em>ignore_errors=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.MultipleFeaturizer.featurize_wrapper" title="Permalink to this definition">¶</a></dt>
<dd><p>An exception wrapper for featurize, used in featurize_many and
featurize_dataframe. featurize_wrapper changes the behavior of featurize
when ignore_errors is True in featurize_many/dataframe.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">x: input data to featurize (type depends on featurizer).
ignore_errors (bool): Returns NaN for entries where exceptions are</p>
<blockquote>
<div>thrown if True. If False, exceptions are thrown as normal.</div></blockquote>
<dl class="last docutils">
<dt>return_errors (bool): If True, returns the feature list as</dt>
<dd>determined by ignore_errors with traceback strings added
as an extra ‘feature’. Entries which featurize without
exceptions have this extra feature set to NaN.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.MultipleFeaturizer.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>X</em>, <em>y=None</em>, <em>**fit_kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.MultipleFeaturizer.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Update the parameters of this featurizer based on available data</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>X - [list of tuples], training data</dd>
<dt>Returns:</dt>
<dd>self</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.MultipleFeaturizer.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.MultipleFeaturizer.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.MultipleFeaturizer.set_n_jobs">
<code class="descname">set_n_jobs</code><span class="sig-paren">(</span><em>n_jobs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.MultipleFeaturizer.set_n_jobs" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the number of threads for this</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.base.StackedFeaturizer">
<em class="property">class </em><code class="descclassname">matminer.featurizers.base.</code><code class="descname">StackedFeaturizer</code><span class="sig-paren">(</span><em>featurizer=None</em>, <em>model=None</em>, <em>name=None</em>, <em>class_names=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.StackedFeaturizer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Use the output of a machine learning model as features</p>
<p>For regression models, we use the single output class.</p>
<p>For classification models, we use the probability for the first N-1 classes where N is the
number of classes.</p>
<dl class="method">
<dt id="matminer.featurizers.base.StackedFeaturizer.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>featurizer=None</em>, <em>model=None</em>, <em>name=None</em>, <em>class_names=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.StackedFeaturizer.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize featurizer</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">featurizer (BaseFeaturizer): Featurizer used to generate inputs to the model
model (BaseEstimator): Fitted machine learning model to be evaluated
name (str): [Optional] name of model, used when creating feature names</p>
<blockquote class="last">
<div>class_names ([str]): Required for classification models, used when creating
feature names (scikit-learn does not specify the number of classes for
a classifier). Class names must be in the same order as the classes in the model
(e.g., class_names[0] must be the name of the class 0)</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.StackedFeaturizer.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.StackedFeaturizer.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.StackedFeaturizer.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.StackedFeaturizer.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.StackedFeaturizer.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>*x</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.StackedFeaturizer.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.base.StackedFeaturizer.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.base.StackedFeaturizer.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-matminer.featurizers.composition">
<span id="matminer-featurizers-composition-module"></span><h2>matminer.featurizers.composition module<a class="headerlink" href="#module-matminer.featurizers.composition" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="matminer.featurizers.composition.AtomicOrbitals">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">AtomicOrbitals</code><a class="headerlink" href="#matminer.featurizers.composition.AtomicOrbitals" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Determine HOMO/LUMO features based on a composition.</p>
<p>The highest occupied molecular orbital (HOMO) and lowest unoccupied
molecular orbital (LUMO) are estiated from the atomic orbital energies
of the composition. The atomic orbital energies are from NIST:
<a class="reference external" href="https://www.nist.gov/pml/data/atomic-reference-data-electronic-structure-calculations">https://www.nist.gov/pml/data/atomic-reference-data-electronic-structure-calculations</a></p>
<p>Warning:
For compositions with inter-species fractions greater than 10,000 (e.g.
dilute alloys such as FeC0.00001) the composition will be truncated (to Fe
in this example). In such extreme cases, the truncation likely reflects the
true physics of the situation (i.e. that the dilute element does not
significantly contribute orbital character to the band structure), but the
user should be aware of this behavior.</p>
<dl class="method">
<dt id="matminer.featurizers.composition.AtomicOrbitals.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicOrbitals.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.AtomicOrbitals.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicOrbitals.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.AtomicOrbitals.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicOrbitals.featurize" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>comp: (Composition)</dt>
<dd>pymatgen Composition object</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd><p class="first">HOMO_character: (str) orbital symbol (‘s’, ‘p’, ‘d’, or ‘f’)
HOMO_element: (str) symbol of element for HOMO
HOMO_energy: (float in eV) absolute energy of HOMO
LUMO_character: (str) orbital symbol (‘s’, ‘p’, ‘d’, or ‘f’)
LUMO_element: (str) symbol of element for LUMO
LUMO_energy: (float in eV) absolute energy of LUMO
gap_AO: (float in eV)</p>
<blockquote class="last">
<div>the estimated bandgap from HOMO and LUMO energeis</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.AtomicOrbitals.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicOrbitals.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.AtomicPackingEfficiency">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">AtomicPackingEfficiency</code><span class="sig-paren">(</span><em>threshold=0.01</em>, <em>n_nearest=(1</em>, <em>3</em>, <em>5)</em>, <em>max_types=6</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicPackingEfficiency" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Packing efficiency based on a geometric theory of the amorphous packing
of hard spheres.</p>
<p>This featurizer computes two different kinds of the features. The first
relate to the distance between a composition and the composition of
the clusters of atoms expected to be efficiently packed based on a
theory from
<a href="#id53"><span class="problematic" id="id54">`Laws et al.&lt;http://www.nature.com/doifinder/10.1038/ncomms9123&gt;`_</span></a>.
The second corresponds to the packing efficiency of a system if all atoms
in the alloy are simultaneously as efficiently-packed as possible.</p>
<p>The packing efficiency in these models is based on the Atomic Packing
Efficiency (APE), which measures the difference between the ratio of
the radii of the central atom to its neighbors and the ideal ratio
of a cluster with the same number of atoms that has optimal packing
efficiency. If the difference between the ratios is too large, the APE is
positive. If the difference is too small, the APE is negative.</p>
<dl class="docutils">
<dt>Features:</dt>
<dd><dl class="first last docutils">
<dt>dist from {k} clusters <a href="#id47"><span class="problematic" id="id48">|APE|</span></a> &lt; {thr} - The distance between an</dt>
<dd>alloy composition and the k clusters that have a packing efficiency
below thr from ideal</dd>
<dt>mean simul. packing efficiency - Mean packing efficiency of all atoms.</dt>
<dd>The packing efficiency is measured with respect to ideal (0)</dd>
<dt>mean abs simul. packing efficiency - Mean absolute value of the</dt>
<dd>packing efficiencies. Closer to zero is more efficiently packed</dd>
</dl>
</dd>
<dt>References:</dt>
<dd>[1] K.J. Laws, D.B. Miracle, M. Ferry, A predictive structural model
for bulk metallic glasses, Nat. Commun. 6 (2015) 8123. doi:10.1038/ncomms9123.</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.composition.AtomicPackingEfficiency.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>threshold=0.01</em>, <em>n_nearest=(1</em>, <em>3</em>, <em>5)</em>, <em>max_types=6</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicPackingEfficiency.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize the featurizer</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>threshold (float):Threshold to use for determining whether</dt>
<dd>a cluster is efficiently packed.</dd>
</dl>
<p>n_nearest ({int}): Number of nearest clusters to use when considering features
max_types (int): Maximum number of atom types to consider when</p>
<blockquote class="last">
<div>looking for efficient clusters. The process for finding
efficient clusters very expensive for large numbers of types</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.AtomicPackingEfficiency.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicPackingEfficiency.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.AtomicPackingEfficiency.compute_nearest_cluster_distance">
<code class="descname">compute_nearest_cluster_distance</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicPackingEfficiency.compute_nearest_cluster_distance" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the distance between a composition and that the nearest
efficiently-packed clusters.</p>
<p>Measures the mean <img class="math" src="_images/math/cce73c20b14f5d57454e0ad66f02dd004d949e0c.png" alt="L_2"/> distance between the alloy composition
and the <img class="math" src="_images/math/0b7c1e16a3a8a849bb8ffdcdbf86f65fd1f30438.png" alt="k"/>-nearest clusters with Atomic Packing Efficiencies
within the user-specified tolerance of 1. <img class="math" src="_images/math/0b7c1e16a3a8a849bb8ffdcdbf86f65fd1f30438.png" alt="k"/> is any of the
numbers defined in the “n_nearest” parameter of this class.</p>
<p>If there are less than <cite>k</cite> efficient clusters in the system, we use
the maximum distance betweeen any two compositions (1) for the
unmatched neighbors.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>comp (Composition): Composition of material to evaluate</dd>
<dt>Return:</dt>
<dd>[float] Average distances</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.AtomicPackingEfficiency.compute_simultaneous_packing_efficiency">
<code class="descname">compute_simultaneous_packing_efficiency</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicPackingEfficiency.compute_simultaneous_packing_efficiency" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the packing efficiency of the system when the neighbor
shell of each atom has the same composition as the alloy. When this
criterion is satisfied, it is possible for every atom in this system
to be simultaneously as efficiently-packed as possible.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>comp (Composition): Composition to be assessed</dd>
<dt>Returns</dt>
<dd>(float) Average APE of all atoms
(float) Average deviation of the APE of each atom from ideal (0)</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.AtomicPackingEfficiency.create_cluster_lookup_tool">
<code class="descname">create_cluster_lookup_tool</code><span class="sig-paren">(</span><em>elements</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicPackingEfficiency.create_cluster_lookup_tool" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the compositions of efficiently-packed clusters in a certain system
of elements</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>elements ([Element]): Elements in system</dd>
<dt>Return:</dt>
<dd><dl class="first last docutils">
<dt>(NearNeighbors): Tool to find nearby clusters in this system. None</dt>
<dd>if there are no efficiently-packed clusters for this combination of elements</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.AtomicPackingEfficiency.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicPackingEfficiency.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.AtomicPackingEfficiency.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicPackingEfficiency.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.AtomicPackingEfficiency.find_ideal_cluster_size">
<code class="descname">find_ideal_cluster_size</code><span class="sig-paren">(</span><em>radius_ratio</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicPackingEfficiency.find_ideal_cluster_size" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the optimal cluster size for a certain radius ratio</p>
<p>Finds the number of nearest neighbors <img class="math" src="_images/math/e11f2701c4a39c7fe543a6c4150b421d50f1c159.png" alt="n"/> that minimizes
<img class="math" src="_images/math/2c79776b8b888d73f48a6a996815a078713a2a78.png" alt="|1 - rp(n)/r|"/>, where <img class="math" src="_images/math/18f11bbc89febc978169289978481f64a403be7e.png" alt="rp(n)"/> is the ideal radius
ratio for a certain <img class="math" src="_images/math/e11f2701c4a39c7fe543a6c4150b421d50f1c159.png" alt="n"/> and <img class="math" src="_images/math/eaa6ad49a7f78fe5a13b486690163bf2dc7e3e60.png" alt="r"/> is the actual ratio.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>radius_ratio (float): math:<cite>r / r_{neighbor}</cite></dd>
<dt>Returns:</dt>
<dd>(int) number of neighboring atoms for that will be the most
efficiently packed.
(float) Optimal APE</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.AtomicPackingEfficiency.get_ideal_radius_ratio">
<code class="descname">get_ideal_radius_ratio</code><span class="sig-paren">(</span><em>n_neighbors</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicPackingEfficiency.get_ideal_radius_ratio" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the idea ratio between the central atom and neighboring
atoms for a neighbor with a certain number of nearest neighbors.</p>
<p>Based on work by <a class="reference external" href="https://www.jstage.jst.go.jp/article/matertrans/47/7/47_7_1737/_article/-char/en">Miracle, Lord, and Ranganathan</a>.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>n_neighbors (int): Number of atoms in 1st NN shell</dd>
<dt>Return:</dt>
<dd>(float) ideal radius ratio <img class="math" src="_images/math/0c9c2dac2bd7f86735f42ef4184918c37425d67a.png" alt="r / r_{neighbor}"/></dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.AtomicPackingEfficiency.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.AtomicPackingEfficiency.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.BandCenter">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">BandCenter</code><a class="headerlink" href="#matminer.featurizers.composition.BandCenter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Estimation of absolute position of band center using electronegativity.</p>
<dl class="docutils">
<dt>Features</dt>
<dd><ul class="first last simple">
<li>Band center</li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.composition.BandCenter.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.BandCenter.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.BandCenter.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.BandCenter.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.BandCenter.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.BandCenter.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>(Rough) estimation of absolution position of band center using
geometric mean of electronegativity.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>comp (Composition).</dd>
<dt>Returns:</dt>
<dd>(float) band center.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.BandCenter.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.BandCenter.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.CationProperty">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">CationProperty</code><span class="sig-paren">(</span><em>data_source</em>, <em>features</em>, <em>stats</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.CationProperty" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.composition.ElementProperty" title="matminer.featurizers.composition.ElementProperty"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.composition.ElementProperty</span></code></a></p>
<p>Features based on properties of cations in a material</p>
<p>Requires that oxidation states have already been determined. Property
statistics weighted by composition.</p>
<p>Features: Based on the statistics of the data_source chosen, computed
by element stoichiometry. The format generally is:</p>
<p>“{data source} {statistic} {property}”</p>
<p>For example:</p>
<p>“DemlData range magn_moment” # Range of magnetic moment via Deml et al. data</p>
<p>For a list of all statistics, see the PropertyStats documentation; for a
list of all attributes available for a given data_source, see the
documentation for the data sources (e.g., PymatgenData, MagpieData,
MatscholarElementData, etc.).</p>
<dl class="method">
<dt id="matminer.featurizers.composition.CationProperty.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.CationProperty.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.CationProperty.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.CationProperty.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.CationProperty.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.CationProperty.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get elemental property attributes</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>comp: Pymatgen composition object</dd>
<dt>Returns:</dt>
<dd>all_attributes: Specified property statistics of features</dd>
</dl>
</dd></dl>

<dl class="classmethod">
<dt id="matminer.featurizers.composition.CationProperty.from_preset">
<em class="property">classmethod </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset_name</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.CationProperty.from_preset" title="Permalink to this definition">¶</a></dt>
<dd><p>Return ElementProperty from a preset string
Args:</p>
<blockquote>
<div><dl class="docutils">
<dt>preset_name: (str) can be one of “magpie”, “deml”, “matminer”, or</dt>
<dd>“matscholar_el”.</dd>
</dl>
</div></blockquote>
<p>Returns:</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.CohesiveEnergy">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">CohesiveEnergy</code><span class="sig-paren">(</span><em>mapi_key=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.CohesiveEnergy" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Cohesive energy per atom using elemental cohesive energies and
formation energy.</p>
<p>Get cohesive energy per atom of a compound by adding known
elemental cohesive energies from the formation energy of the
compound.</p>
<dl class="docutils">
<dt>Parameters:</dt>
<dd><dl class="first last docutils">
<dt>mapi_key (str): Materials API key for looking up formation energy</dt>
<dd>by composition alone (if you don’t set the formation energy
yourself).</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.composition.CohesiveEnergy.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>mapi_key=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.CohesiveEnergy.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.CohesiveEnergy.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.CohesiveEnergy.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.CohesiveEnergy.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.CohesiveEnergy.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.CohesiveEnergy.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em>, <em>formation_energy_per_atom=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.CohesiveEnergy.featurize" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">comp: (str) compound composition, eg: “NaCl”
formation_energy_per_atom: (float) the formation energy per atom of</p>
<blockquote class="last">
<div>your compound. If not set, will look up the most stable
formation energy from the Materials Project database.</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.CohesiveEnergy.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.CohesiveEnergy.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.ElectronAffinity">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">ElectronAffinity</code><a class="headerlink" href="#matminer.featurizers.composition.ElectronAffinity" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Calculate average electron affinity times formal charge of anion elements.
Note: The formal charges must already be computed before calling <cite>featurize</cite>.
Generates average (electron affinity*formal charge) of anions.</p>
<dl class="method">
<dt id="matminer.featurizers.composition.ElectronAffinity.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElectronAffinity.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElectronAffinity.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElectronAffinity.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElectronAffinity.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElectronAffinity.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElectronAffinity.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElectronAffinity.featurize" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>comp: (Composition) Composition to be featurized</dd>
<dt>Returns:</dt>
<dd>avg_anion_affin (single-element list): average electron affinity*formal charge of anions</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElectronAffinity.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElectronAffinity.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.ElectronegativityDiff">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">ElectronegativityDiff</code><span class="sig-paren">(</span><em>stats=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElectronegativityDiff" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Features from electronegativity differences between anions and cations.</p>
<p>These features are computed by first determining the concentration-weighted
average electronegativity of the anions. For example, the average
electronegativity of the anions in CaCoSO is equal to 1/2 of that of S and 1/2 of that of O.
We then compute the difference between the electronegativity of each cation
and the average anion electronegativity.</p>
<p>The feature values are then determined based on the concentration-weighted statistics
in the same manner as ElementProperty features. For example, one value could be
the mean electronegativity difference over all the anions.</p>
<dl class="docutils">
<dt>Parameters:</dt>
<dd>data_source (data class): source from which to retrieve element data
stats: Property statistics to compute</dd>
</dl>
<p>Generates average electronegativity difference between cations and anions</p>
<dl class="method">
<dt id="matminer.featurizers.composition.ElectronegativityDiff.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>stats=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElectronegativityDiff.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElectronegativityDiff.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElectronegativityDiff.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElectronegativityDiff.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElectronegativityDiff.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElectronegativityDiff.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElectronegativityDiff.featurize" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>comp: Pymatgen Composition object</dd>
<dt>Returns:</dt>
<dd>en_diff_stats (list of floats): Property stats of electronegativity difference</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElectronegativityDiff.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElectronegativityDiff.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.ElementFraction">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">ElementFraction</code><a class="headerlink" href="#matminer.featurizers.composition.ElementFraction" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Class to calculate the atomic fraction of each element in a composition.</p>
<p>Generates a vector where each index represents an element in atomic number order.</p>
<dl class="method">
<dt id="matminer.featurizers.composition.ElementFraction.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElementFraction.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElementFraction.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElementFraction.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElementFraction.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElementFraction.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElementFraction.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElementFraction.featurize" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>comp: Pymatgen Composition object</dd>
<dt>Returns:</dt>
<dd>vector (list of floats): fraction of each element in a composition</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElementFraction.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElementFraction.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.ElementProperty">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">ElementProperty</code><span class="sig-paren">(</span><em>data_source</em>, <em>features</em>, <em>stats</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElementProperty" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Class to calculate elemental property attributes.</p>
<p>To initialize quickly, use the from_preset() method.</p>
<p>Features: Based on the statistics of the data_source chosen, computed
by element stoichiometry. The format generally is:</p>
<p>“{data source} {statistic} {property}”</p>
<p>For example:</p>
<p>“PymetgenData range X”  # Range of electronegativity from Pymatgen data</p>
<p>For a list of all statistics, see the PropertyStats documentation; for a
list of all attributes available for a given data_source, see the
documentation for the data sources (e.g., PymatgenData, MagpieData,
MatscholarElementData, etc.).</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>data_source (AbstractData or str): source from which to retrieve</dt>
<dd>element property data (or use str for preset: “pymatgen”,
“magpie”, or “deml”)</dd>
<dt>features (list of strings): List of elemental properties to use</dt>
<dd>(these must be supported by data_source)</dd>
<dt>stats (list of strings): a list of weighted statistics to compute to for each</dt>
<dd>property (see PropertyStats for available stats)</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.composition.ElementProperty.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>data_source</em>, <em>features</em>, <em>stats</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElementProperty.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElementProperty.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElementProperty.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElementProperty.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElementProperty.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElementProperty.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElementProperty.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get elemental property attributes</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>comp: Pymatgen composition object</dd>
<dt>Returns:</dt>
<dd>all_attributes: Specified property statistics of features</dd>
</dl>
</dd></dl>

<dl class="classmethod">
<dt id="matminer.featurizers.composition.ElementProperty.from_preset">
<em class="property">classmethod </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset_name</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElementProperty.from_preset" title="Permalink to this definition">¶</a></dt>
<dd><p>Return ElementProperty from a preset string
Args:</p>
<blockquote>
<div><dl class="docutils">
<dt>preset_name: (str) can be one of “magpie”, “deml”, “matminer”, or</dt>
<dd>“matscholar_el”.</dd>
</dl>
</div></blockquote>
<p>Returns:</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ElementProperty.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ElementProperty.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.IonProperty">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">IonProperty</code><span class="sig-paren">(</span><em>data_source=&lt;matminer.utils.data.PymatgenData object&gt;</em>, <em>fast=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.IonProperty" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Ionic property attributes. Similar to ElementProperty.</p>
<dl class="method">
<dt id="matminer.featurizers.composition.IonProperty.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>data_source=&lt;matminer.utils.data.PymatgenData object&gt;</em>, <em>fast=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.IonProperty.__init__" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd><blockquote class="first">
<div><dl class="docutils">
<dt>data_source - (OxidationStateMixin) - A AbstractData class that supports</dt>
<dd>the <cite>get_oxidation_state</cite> method.</dd>
</dl>
</div></blockquote>
<dl class="last docutils">
<dt>fast - (boolean) whether to assume elements exist in a single oxidation state,</dt>
<dd>which can dramatically accelerate the calculation of whether an ionic compound
is possible, but will miss heterovalent compounds like Fe3O4.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.IonProperty.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.IonProperty.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.IonProperty.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.IonProperty.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.IonProperty.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.IonProperty.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Ionic character attributes</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>comp: (Composition) Composition to be featurized</dd>
<dt>Returns:</dt>
<dd>cpd_possible (bool): Indicates if a neutral ionic compound is possible
max_ionic_char (float): Maximum ionic character between two atoms
avg_ionic_char (float): Average ionic character</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.IonProperty.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.IonProperty.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.Miedema">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">Miedema</code><span class="sig-paren">(</span><em>struct_types='inter'</em>, <em>ss_types='min'</em>, <em>data_source='Miedema'</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Miedema" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Formation enthalpies of intermetallic compounds, from Miedema et al.</p>
<p>Calculate the formation enthalpies of the intermetallic compound,
solid solution and amorphous phase of a given composition, based on
semi-empirical Miedema model (and some extensions), particularly for
transitional metal alloys.
Support elemental, binary and multicomponent alloys.</p>
<blockquote>
<div>For elemental/binary alloys, the formulation is based on the original
works by Miedema et al. in 1980s;
For multicomponent alloys, the formulation is basically the linear
combination of sub-binary systems. This is reported to work well for
ternary alloys, but needs to be careful with quaternary alloys and more.</div></blockquote>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>struct_types (str or list of str): default=’inter’</dt>
<dd>if str, one target structure;
if list, a list of target structures.
e.g.
‘inter’: intermetallic compound
‘ss’: solid solution
‘amor’: amorphous phase
‘all’: same for [‘inter’, ‘ss’, ‘amor’]
[‘inter’, ‘ss’]: amorphous phase and solid solution, as an example</dd>
<dt>ss_types (str or list of str): only for ss, default=’min’</dt>
<dd>if str, one structure type of ss;
if list, a list of structure types of ss.
e.g.
‘fcc’: fcc solid solution
‘bcc’: bcc solid solution
‘hcp’: hcp solid solution
‘no_latt’: solid solution with no specific structure type
‘min’: min value of [‘fcc’, ‘bcc’, ‘hcp’, ‘no_latt’]
‘all’: same for [‘fcc’, ‘bcc’, ‘hcp’, ‘no_latt’]
[‘fcc’, ‘bcc’]: fcc and bcc solid solutions, as an example</dd>
<dt>data_source (str): default=’Miedema’, source of dataset</dt>
<dd><dl class="first last docutils">
<dt>‘Miedema’: read from ‘Miedema.csv’</dt>
<dd><p class="first">parameterized by Miedema et al. in 1980s,
containing parameters for 73 types of elements:</p>
<blockquote class="last">
<div>‘molar_volume’
‘electron_density’
‘electronegativity’
‘valence_electrons’
‘a_const’
‘R_const’
‘H_trans’
‘compressibility’
‘shear_modulus’
‘melting_point’
‘structural_stability’</div></blockquote>
</dd>
</dl>
</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list of floats) Miedema formation enthalpies (per atom)</dt>
<dd><p class="first">-formation_enthalpy_inter: for intermetallic compound
-formation_enthalpy_ss: for solid solution, can be divided into</p>
<blockquote>
<div><dl class="docutils">
<dt>‘min’, ‘fcc’, ‘bcc’, ‘hcp’, ‘no_latt’</dt>
<dd>for different lattice_types</dd>
</dl>
</div></blockquote>
<p class="last">-formation_enthalpy_amor: for amorphous phase</p>
</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.composition.Miedema.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>struct_types='inter'</em>, <em>ss_types='min'</em>, <em>data_source='Miedema'</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Miedema.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.Miedema.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Miedema.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.Miedema.deltaH_chem">
<code class="descname">deltaH_chem</code><span class="sig-paren">(</span><em>elements</em>, <em>fracs</em>, <em>struct</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Miedema.deltaH_chem" title="Permalink to this definition">¶</a></dt>
<dd><p>Chemical term of formation enthalpy
Args:</p>
<blockquote>
<div>elements (list of str): list of elements
fracs (list of floats): list of atomic fractions
struct (str): ‘inter’, ‘ss’ or ‘amor’</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>deltaH_chem (float): chemical term of formation enthalpy</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.Miedema.deltaH_elast">
<code class="descname">deltaH_elast</code><span class="sig-paren">(</span><em>elements</em>, <em>fracs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Miedema.deltaH_elast" title="Permalink to this definition">¶</a></dt>
<dd><p>Elastic term of formation enthalpy
Args:</p>
<blockquote>
<div>elements (list of str): list of elements
fracs (list of floats): list of atomic fractions</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>deltaH_elastic (float): elastic term of formation enthalpy</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.Miedema.deltaH_struct">
<code class="descname">deltaH_struct</code><span class="sig-paren">(</span><em>elements</em>, <em>fracs</em>, <em>latt</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Miedema.deltaH_struct" title="Permalink to this definition">¶</a></dt>
<dd><p>Structural term of formation enthalpy, only for solid solution
Args:</p>
<blockquote>
<div>elements (list of str): list of elements
fracs (list of floats): list of atomic fractions
latt (str): ‘fcc’, ‘bcc’, ‘hcp’ or ‘no_latt’</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>deltaH_struct (float): structural term of formation enthalpy</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.Miedema.deltaH_topo">
<code class="descname">deltaH_topo</code><span class="sig-paren">(</span><em>elements</em>, <em>fracs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Miedema.deltaH_topo" title="Permalink to this definition">¶</a></dt>
<dd><p>Topological term of formation enthalpy, only for amorphous phase
Args:</p>
<blockquote>
<div>elements (list of str): list of elements
fracs (list of floats): list of atomic fractions</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>deltaH_topo (float): topological term of formation enthalpy</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.Miedema.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Miedema.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.Miedema.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Miedema.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get Miedema formation enthalpies of target structures: inter, amor,
ss (can be further divided into ‘min’, ‘fcc’, ‘bcc’, ‘hcp’, ‘no_latt’</p>
<blockquote>
<div>for different lattice_types)</div></blockquote>
<dl class="docutils">
<dt>Args:</dt>
<dd>comp: Pymatgen composition object</dd>
<dt>Returns:</dt>
<dd>miedema (list of floats): formation enthalpies of target structures</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.Miedema.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Miedema.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.OxidationStates">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">OxidationStates</code><span class="sig-paren">(</span><em>stats=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.OxidationStates" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Statistics about the oxidation states for each specie.
Features are concentration-weighted statistics of the oxidation states.</p>
<dl class="method">
<dt id="matminer.featurizers.composition.OxidationStates.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>stats=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.OxidationStates.__init__" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>stats - (list of string), which statistics compute</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.OxidationStates.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.OxidationStates.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.OxidationStates.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.OxidationStates.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.OxidationStates.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.OxidationStates.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="classmethod">
<dt id="matminer.featurizers.composition.OxidationStates.from_preset">
<em class="property">classmethod </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset_name</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.OxidationStates.from_preset" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.OxidationStates.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.OxidationStates.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.Stoichiometry">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">Stoichiometry</code><span class="sig-paren">(</span><em>p_list=(0</em>, <em>2</em>, <em>3</em>, <em>5</em>, <em>7</em>, <em>10)</em>, <em>num_atoms=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Stoichiometry" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Calculate norms of stoichiometric attributes.</p>
<dl class="docutils">
<dt>Parameters:</dt>
<dd>p_list (list of ints): list of norms to calculate
num_atoms (bool): whether to return number of atoms per formula unit</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.composition.Stoichiometry.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>p_list=(0</em>, <em>2</em>, <em>3</em>, <em>5</em>, <em>7</em>, <em>10)</em>, <em>num_atoms=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Stoichiometry.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.Stoichiometry.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Stoichiometry.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.Stoichiometry.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Stoichiometry.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.Stoichiometry.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Stoichiometry.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get stoichiometric attributes
Args:</p>
<blockquote>
<div>comp: Pymatgen composition object
p_list (list of ints)</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>p_norm (list of floats): Lp norm-based stoichiometric attributes.</dt>
<dd>Returns number of atoms if no p-values specified.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.Stoichiometry.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.Stoichiometry.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.TMetalFraction">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">TMetalFraction</code><a class="headerlink" href="#matminer.featurizers.composition.TMetalFraction" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Class to calculate fraction of magnetic transition metals in a composition.</p>
<dl class="docutils">
<dt>Parameters:</dt>
<dd>data_source (data class): source from which to retrieve element data</dd>
</dl>
<p>Generates: Fraction of magnetic transition metal atoms in a compound</p>
<dl class="method">
<dt id="matminer.featurizers.composition.TMetalFraction.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.TMetalFraction.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.TMetalFraction.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.TMetalFraction.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.TMetalFraction.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.TMetalFraction.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.TMetalFraction.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.TMetalFraction.featurize" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>comp: Pymatgen Composition object</dd>
<dt>Returns:</dt>
<dd>frac_magn_atoms (single-element list): fraction of magnetic transitional metal atoms in a compound</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.TMetalFraction.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.TMetalFraction.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.ValenceOrbital">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">ValenceOrbital</code><span class="sig-paren">(</span><em>orbitals=('s'</em>, <em>'p'</em>, <em>'d'</em>, <em>'f')</em>, <em>props=('avg'</em>, <em>'frac')</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ValenceOrbital" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Attributes of valence orbital shells</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">data_source (data object): source from which to retrieve element data
orbitals (list): orbitals to calculate
props (list): specifies whether to return average number of electrons in each orbital,</p>
<blockquote class="last">
<div>fraction of electrons in each orbital, or both</div></blockquote>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.composition.ValenceOrbital.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>orbitals=('s'</em>, <em>'p'</em>, <em>'d'</em>, <em>'f')</em>, <em>props=('avg'</em>, <em>'frac')</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ValenceOrbital.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ValenceOrbital.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ValenceOrbital.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ValenceOrbital.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ValenceOrbital.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ValenceOrbital.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ValenceOrbital.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Weighted fraction of valence electrons in each orbital</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>comp: Pymatgen composition object</dd>
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>valence_attributes (list of floats): Average number and/or</dt>
<dd>fraction of valence electrons in specfied orbitals</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.ValenceOrbital.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.ValenceOrbital.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.composition.YangSolidSolution">
<em class="property">class </em><code class="descclassname">matminer.featurizers.composition.</code><code class="descname">YangSolidSolution</code><a class="headerlink" href="#matminer.featurizers.composition.YangSolidSolution" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Mixing thermochemistry and size mismatch terms of Yang and Zhang (2012)</p>
<p>This featurizer returns two different features developed by
.. Yang and Zhang <cite>https://linkinghub.elsevier.com/retrieve/pii/S0254058411009357</cite>
to predict whether metal alloys will form metallic glasses,
crystalline solid solutions, or intermetallics.
The first, Omega, is related to the balance between the mixing entropy and
mixing enthalpy of the liquid phase. The second, delta, is related to the
atomic size mismatch between the different elements of the material.</p>
<dl class="docutils">
<dt>Features</dt>
<dd>Yang omega - Mixing thermochemistry feature, Omega
Yang delta - Atomic size mismatch term</dd>
<dt>References:</dt>
<dd></dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.composition.YangSolidSolution.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.YangSolidSolution.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.YangSolidSolution.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.YangSolidSolution.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.YangSolidSolution.compute_delta">
<code class="descname">compute_delta</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.YangSolidSolution.compute_delta" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute Yang’s delta parameter</p>
<blockquote>
<div>:math:<a href="#id1"><span class="problematic" id="id2">`</span></a>sqrt{sum^n_{i=1} c_i left( 1 -</div></blockquote>
<p>rac{r_i}{ar{r}} 
ight)^2 }`</p>
<blockquote>
<div><p>where <img class="math" src="_images/math/ff90a5f025d9fd305aac19c8dd64fa15f0c789a1.png" alt="c_i"/> and <img class="math" src="_images/math/889fc7f9c8e35e08413407d53c89909849345138.png" alt="r_i"/> are the fraction and radius of
element <img class="math" src="_images/math/df0deb143e5ac127f00bd248ee8001ecae572adc.png" alt="i"/>, and <div class="system-message">
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">ar{r}</tt>)</p>
latex exited with error
[stdout]
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(./math.tex
LaTeX2e &lt;2015/01/01&gt;
Babel &lt;3.9l&gt; and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/size12.clo))
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/inputenc.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/utf8x.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/amscls/amsthm.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/anyfontsize/anyfontsize.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/bm.sty) (./math.aux)
(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/ucsencs.def)
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/umsb.fd)

! Package inputenc Error: Keyboard character used is undefined
(inputenc)                in inputencoding `utf8x'.

See the inputenc package documentation for explanation.
Type  H &lt;return&gt;  for immediate help.
 ...                                              
                                                  
l.13 \fontsize{12}{14}\selectfont $^^H
                                      ar{r}$
[1] (./math.aux) )
(see the transcript file for additional information)
Output written on math.dvi (1 page, 208 bytes).
Transcript written on math.log.
</div>
 is the fraction-weighted
average of the radii. We use the radii compiled by
.. Miracle et al. <cite>https://www.tandfonline.com/doi/ref/10.1179/095066010X12646898728200?scroll=top</cite>.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>comp (Composition) - Composition to assess</dd>
<dt>Returns:</dt>
<dd>(float) delta</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.YangSolidSolution.compute_omega">
<code class="descname">compute_omega</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.YangSolidSolution.compute_omega" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute Yang’s mixing thermodynamics descriptor</p>
<blockquote>
<div>:math:<a href="#id3"><span class="problematic" id="id4">`</span></a></div></blockquote>
<p>rac{T_m Delta S_{mix}}{ |  Delta H_{mix} | }`</p>
<blockquote>
<div><p>Where <img class="math" src="_images/math/5fa6513bef00e529069be708641fcce5a1535803.png" alt="T_m"/> is average melting temperature,
<img class="math" src="_images/math/ac5b8bd01421ff3a8f1a464013ce05b7a4373141.png" alt="\Delta S_{mix}"/> is the ideal mixing entropy,
and <img class="math" src="_images/math/56e23ea8dd42fdbfc2b216f54b730114ec8acfd8.png" alt="\Delta H_{mix}"/> is the average mixing enthalpies
of all pairs of elements in the alloy</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>comp (Composition) - Composition to featurizer</dd>
<dt>Returns:</dt>
<dd>(float) Omega</dd>
</dl>
</div></blockquote>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.YangSolidSolution.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.YangSolidSolution.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.YangSolidSolution.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.YangSolidSolution.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.composition.YangSolidSolution.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.YangSolidSolution.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="matminer.featurizers.composition.has_oxidation_states">
<code class="descclassname">matminer.featurizers.composition.</code><code class="descname">has_oxidation_states</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.composition.has_oxidation_states" title="Permalink to this definition">¶</a></dt>
<dd><p>Check if a composition object has oxidation states for each element</p>
<p>TODO: Does this make sense to add to pymatgen? -wardlt</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>comp - (Composition) Composition to check</dd>
<dt>Returns:</dt>
<dd>(Boolean) Whether this composition object contains oxidation states</dd>
</dl>
</dd></dl>

</div>
<div class="section" id="module-matminer.featurizers.conversions">
<span id="matminer-featurizers-conversions-module"></span><h2>matminer.featurizers.conversions module<a class="headerlink" href="#module-matminer.featurizers.conversions" title="Permalink to this headline">¶</a></h2>
<p>This module defines featurizers that can convert between different data formats</p>
<p>Note that these featurizers do not produce machine learning-ready features.
Instead, they should be used to pre-process data, either through a standalone
transformation or as part of a Pipeline.</p>
<dl class="class">
<dt id="matminer.featurizers.conversions.CompositionToOxidComposition">
<em class="property">class </em><code class="descclassname">matminer.featurizers.conversions.</code><code class="descname">CompositionToOxidComposition</code><span class="sig-paren">(</span><em>target_col_id='composition_oxid'</em>, <em>overwrite_data=False</em>, <em>coerce_mixed=True</em>, <em>return_original_on_error=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.CompositionToOxidComposition" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.conversions.ConversionFeaturizer" title="matminer.featurizers.conversions.ConversionFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.conversions.ConversionFeaturizer</span></code></a></p>
<p>Utility featurizer to add oxidation states to a pymatgen Composition.</p>
<p>Oxidation states are determined using pymatgen’s guessing routines.
The expected input is a <cite>pymatgen.core.composition.Composition</cite> object.</p>
<p>Note that this Featurizer does not produce machine learning-ready features
but instead can be applied to pre-process data or as part of a Pipeline.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>target_col_id (str or None): The column in which the converted data will</dt>
<dd>be written. If the column already exists then an error will be
thrown unless <cite>overwrite_data</cite> is set to <cite>True</cite>. If <cite>target_col_id</cite>
begins with an underscore the data will be written to the column:
<cite>“{}_{}”.format(col_id, target_col_id[1:])</cite>, where <cite>col_id</cite> is the
column being featurized. If <cite>target_col_id</cite> is set to None then
the data will be written “in place” to the <cite>col_id</cite> column (this
will only work if <cite>overwrite_data=True</cite>).</dd>
<dt>overwrite_data (bool): Overwrite any data in <cite>target_column</cite> if it</dt>
<dd>exists.</dd>
<dt>coerce_mixed (bool): If a composition has both species containing</dt>
<dd>oxid states and not containing oxid states, strips all of the
oxid states and guesses the entire composition’s oxid states.</dd>
<dt>return_original_on_error: If the oxidation states cannot be</dt>
<dd>guessed and set to True, the composition without oxidation states
will be returned. If set to False, an error will be thrown.</dd>
<dt><a href="#id5"><span class="problematic" id="id6">**</span></a>kwargs: Parameters to control the settings for</dt>
<dd><cite>pymatgen.io.structure.Structure.add_oxidation_state_by_guess()</cite>.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.conversions.CompositionToOxidComposition.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>target_col_id='composition_oxid'</em>, <em>overwrite_data=False</em>, <em>coerce_mixed=True</em>, <em>return_original_on_error=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.CompositionToOxidComposition.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.CompositionToOxidComposition.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.CompositionToOxidComposition.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.CompositionToOxidComposition.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>comp</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.CompositionToOxidComposition.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Add oxidation states to a Structure using pymatgen’s guessing routines.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>comp (<cite>pymatgen.core.composition.Composition</cite>): A composition.</dd>
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(<cite>pymatgen.core.composition.Composition</cite>): A Composition object</dt>
<dd>decorated with oxidation states.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.CompositionToOxidComposition.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.CompositionToOxidComposition.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.conversions.ConversionFeaturizer">
<em class="property">class </em><code class="descclassname">matminer.featurizers.conversions.</code><code class="descname">ConversionFeaturizer</code><span class="sig-paren">(</span><em>target_col_id</em>, <em>overwrite_data</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.ConversionFeaturizer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Abstract class to perform data conversions.</p>
<p>Featurizers subclassing this class do not produce machine learning-ready
features but instead are used to pre-process data. As Featurizers,
the conversion process can take advantage of the parallelisation implemented
in ScikitLearn.</p>
<p>Note that <cite>feature_labels</cite> are set dynamically and may depend on the column
id of the data being featurized. As such, <cite>feature_labels</cite> may differ
before and after featurization.</p>
<p>ConversionFeaturizers differ from other Featurizers in that the user can
can specify the column in which to write the converted data. The output
column is controlled through <cite>target_col_id</cite>. ConversionFeaturizers also
have the ability to overwrite data in existing columns. This is
controlled by the <cite>overwrite_data</cite> option. “in place” conversion of data can
be achieved by setting <cite>target_col_id=None</cite> and <cite>overwrite_data=True</cite>. See
the docstring below for more details.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>target_col_id (str or None): The column in which the converted data will</dt>
<dd>be written. If the column already exists then an error will be
thrown unless <cite>overwrite_data</cite> is set to <cite>True</cite>. If <cite>target_col_id</cite>
begins with an underscore the data will be written to the column:
<cite>“{}_{}”.format(col_id, target_col_id[1:])</cite>, where <cite>col_id</cite> is the
column being featurized. If <cite>target_col_id</cite> is set to None then
the data will be written “in place” to the <cite>col_id</cite> column (this
will only work if <cite>overwrite_data=True</cite>).</dd>
<dt>overwrite_data (bool): Overwrite any data in <cite>target_col_id</cite> if it</dt>
<dd>exists.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.conversions.ConversionFeaturizer.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>target_col_id</em>, <em>overwrite_data</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.ConversionFeaturizer.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.ConversionFeaturizer.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.ConversionFeaturizer.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.ConversionFeaturizer.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.ConversionFeaturizer.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.ConversionFeaturizer.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>*x</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.ConversionFeaturizer.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.ConversionFeaturizer.featurize_dataframe">
<code class="descname">featurize_dataframe</code><span class="sig-paren">(</span><em>df</em>, <em>col_id</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.ConversionFeaturizer.featurize_dataframe" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform the data conversion and set the target column dynamically.</p>
<p><cite>target_col_id</cite>, and accordingly <cite>feature_labels</cite>, may depend on the
column id of the data being featurized. As such, <cite>target_col_id</cite> is
first set dynamically before the <cite>BaseFeaturizer.featurize_dataframe()</cite>
super method is called.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">df (Pandas.DataFrame): Dataframe containing input data.
col_id (str or list of str): column label containing objects to</p>
<blockquote>
<div>featurize. Can be multiple labels if the featurize function
requires multiple inputs.</div></blockquote>
<dl class="last docutils">
<dt><a href="#id7"><span class="problematic" id="id8">**</span></a>kwargs: Additional keyword arguments that will be passed through</dt>
<dd>to <cite>BseFeaturizer.featurize_dataframe()</cite>.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>(Pandas.Dataframe): The updated dataframe.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.ConversionFeaturizer.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.ConversionFeaturizer.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.conversions.DictToObject">
<em class="property">class </em><code class="descclassname">matminer.featurizers.conversions.</code><code class="descname">DictToObject</code><span class="sig-paren">(</span><em>target_col_id='_object'</em>, <em>overwrite_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.DictToObject" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.conversions.ConversionFeaturizer" title="matminer.featurizers.conversions.ConversionFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.conversions.ConversionFeaturizer</span></code></a></p>
<p>Utility featurizer to decode a dict to Python object via MSON.</p>
<p>Note that this Featurizer does not produce machine learning-ready features
but instead can be applied to pre-process data or as part of a Pipeline.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>target_col_id (str or None): The column in which the converted data will</dt>
<dd>be written. If the column already exists then an error will be
thrown unless <cite>overwrite_data</cite> is set to <cite>True</cite>. If <cite>target_col_id</cite>
begins with an underscore the data will be written to the column:
<cite>“{}_{}”.format(col_id, target_col_id[1:])</cite>, where <cite>col_id</cite> is the
column being featurized. If <cite>target_col_id</cite> is set to None then
the data will be written “in place” to the <cite>col_id</cite> column (this
will only work if <cite>overwrite_data=True</cite>).</dd>
<dt>overwrite_data (bool): Overwrite any data in <cite>target_column</cite> if it</dt>
<dd>exists.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.conversions.DictToObject.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>target_col_id='_object'</em>, <em>overwrite_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.DictToObject.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.DictToObject.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.DictToObject.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.DictToObject.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>dict_data</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.DictToObject.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert a string to a pymatgen Composition.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>dict_data (dict): A MSONable dictionary. E.g. Produced from</dt>
<dd><cite>pymatgen.core.structure.Structure.as_dict()</cite>.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>(object): An object with the type specified by <cite>dict_data</cite>.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.DictToObject.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.DictToObject.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.conversions.JsonToObject">
<em class="property">class </em><code class="descclassname">matminer.featurizers.conversions.</code><code class="descname">JsonToObject</code><span class="sig-paren">(</span><em>target_col_id='_object'</em>, <em>overwrite_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.JsonToObject" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.conversions.ConversionFeaturizer" title="matminer.featurizers.conversions.ConversionFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.conversions.ConversionFeaturizer</span></code></a></p>
<p>Utility featurizer to decode json data to a Python object via MSON.</p>
<p>Note that this Featurizer does not produce machine learning-ready features
but instead can be applied to pre-process data or as part of a Pipeline.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>target_col_id (str or None): The column in which the converted data will</dt>
<dd>be written. If the column already exists then an error will be
thrown unless <cite>overwrite_data</cite> is set to <cite>True</cite>. If <cite>target_col_id</cite>
begins with an underscore the data will be written to the column:
<cite>“{}_{}”.format(col_id, target_col_id[1:])</cite>, where <cite>col_id</cite> is the
column being featurized. If <cite>target_col_id</cite> is set to None then
the data will be written “in place” to the <cite>col_id</cite> column (this
will only work if <cite>overwrite_data=True</cite>).</dd>
<dt>overwrite_data (bool): Overwrite any data in <cite>target_column</cite> if it</dt>
<dd>exists.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.conversions.JsonToObject.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>target_col_id='_object'</em>, <em>overwrite_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.JsonToObject.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.JsonToObject.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.JsonToObject.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.JsonToObject.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>json_data</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.JsonToObject.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert a string to a pymatgen Composition.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>json_data (dict): MSONable json data. E.g. Produced from</dt>
<dd><cite>pymatgen.core.structure.Structure.to_json()</cite>.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>(object): An object with the type specified by <cite>json_data</cite>.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.JsonToObject.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.JsonToObject.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.conversions.StrToComposition">
<em class="property">class </em><code class="descclassname">matminer.featurizers.conversions.</code><code class="descname">StrToComposition</code><span class="sig-paren">(</span><em>reduce=False</em>, <em>target_col_id='composition'</em>, <em>overwrite_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StrToComposition" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.conversions.ConversionFeaturizer" title="matminer.featurizers.conversions.ConversionFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.conversions.ConversionFeaturizer</span></code></a></p>
<p>Utility featurizer to convert a string to a Composition</p>
<p>The expected input is a composition in string form (e.g. “Fe2O3”).</p>
<p>Note that this Featurizer does not produce machine learning-ready features
but instead can be applied to pre-process data or as part of a Pipeline.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>reduce (bool): Whether to return a reduced</dt>
<dd><cite>pymatgen.core.composition.Composition</cite> object.</dd>
<dt>target_col_id (str or None): The column in which the converted data will</dt>
<dd>be written. If the column already exists then an error will be
thrown unless <cite>overwrite_data</cite> is set to <cite>True</cite>. If <cite>target_col_id</cite>
begins with an underscore the data will be written to the column:
<cite>“{}_{}”.format(col_id, target_col_id[1:])</cite>, where <cite>col_id</cite> is the
column being featurized. If <cite>target_col_id</cite> is set to None then
the data will be written “in place” to the <cite>col_id</cite> column (this
will only work if <cite>overwrite_data=True</cite>).</dd>
<dt>overwrite_data (bool): Overwrite any data in <cite>target_column</cite> if it</dt>
<dd>exists.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.conversions.StrToComposition.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>reduce=False</em>, <em>target_col_id='composition'</em>, <em>overwrite_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StrToComposition.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.StrToComposition.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StrToComposition.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.StrToComposition.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>string_composition</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StrToComposition.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert a string to a pymatgen Composition.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>string_composition (str): A chemical formula as a string (e.g.</dt>
<dd>“Fe2O3”).</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>(<cite>pymatgen.core.composition.Composition</cite>): A composition object.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.StrToComposition.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StrToComposition.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.conversions.StructureToComposition">
<em class="property">class </em><code class="descclassname">matminer.featurizers.conversions.</code><code class="descname">StructureToComposition</code><span class="sig-paren">(</span><em>reduce=False</em>, <em>target_col_id='composition'</em>, <em>overwrite_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToComposition" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.conversions.ConversionFeaturizer" title="matminer.featurizers.conversions.ConversionFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.conversions.ConversionFeaturizer</span></code></a></p>
<p>Utility featurizer to convert a Structure to a Composition.</p>
<p>The expected input is a <cite>pymatgen.core.structure.Structure</cite> object.</p>
<p>Note that this Featurizer does not produce machine learning-ready features
but instead can be applied to pre-process data or as part of a Pipeline.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">reduce (bool): Whether to return a reduced Composition object.
target_col_id (str or None): The column in which the converted data will</p>
<blockquote>
<div>be written. If the column already exists then an error will be
thrown unless <cite>overwrite_data</cite> is set to <cite>True</cite>. If <cite>target_col_id</cite>
begins with an underscore the data will be written to the column:
<cite>“{}_{}”.format(col_id, target_col_id[1:])</cite>, where <cite>col_id</cite> is the
column being featurized. If <cite>target_col_id</cite> is set to None then
the data will be written “in place” to the <cite>col_id</cite> column (this
will only work if <cite>overwrite_data=True</cite>).</div></blockquote>
<dl class="last docutils">
<dt>overwrite_data (bool): Overwrite any data in <cite>target_column</cite> if it</dt>
<dd>exists.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.conversions.StructureToComposition.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>reduce=False</em>, <em>target_col_id='composition'</em>, <em>overwrite_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToComposition.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.StructureToComposition.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToComposition.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.StructureToComposition.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>structure</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToComposition.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert a string to a pymatgen Composition.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>structure (<cite>pymatgen.core.structure.Structure</cite>): A structure.</dd>
<dt>Returns:</dt>
<dd>(<cite>pymatgen.core.composition.Composition</cite>): A Composition object.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.StructureToComposition.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToComposition.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.conversions.StructureToIStructure">
<em class="property">class </em><code class="descclassname">matminer.featurizers.conversions.</code><code class="descname">StructureToIStructure</code><span class="sig-paren">(</span><em>target_col_id='istructure'</em>, <em>overwrite_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToIStructure" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.conversions.ConversionFeaturizer" title="matminer.featurizers.conversions.ConversionFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.conversions.ConversionFeaturizer</span></code></a></p>
<p>Utility featurizer to convert a Structure to an immutable IStructure.</p>
<p>This is useful if you are using features that employ caching.</p>
<p>The expected input is a <cite>pymatgen.core.structure.Structure</cite> object.</p>
<p>Note that this Featurizer does not produce machine learning-ready features
but instead can be applied to pre-process data or as part of a Pipeline.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>target_col_id (str or None): The column in which the converted data will</dt>
<dd>be written. If the column already exists then an error will be
thrown unless <cite>overwrite_data</cite> is set to <cite>True</cite>. If <cite>target_col_id</cite>
begins with an underscore the data will be written to the column:
<cite>“{}_{}”.format(col_id, target_col_id[1:])</cite>, where <cite>col_id</cite> is the
column being featurized. If <cite>target_col_id</cite> is set to None then
the data will be written “in place” to the <cite>col_id</cite> column (this
will only work if <cite>overwrite_data=True</cite>).</dd>
<dt>overwrite_data (bool): Overwrite any data in <cite>target_column</cite> if it</dt>
<dd>exists.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.conversions.StructureToIStructure.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>target_col_id='istructure'</em>, <em>overwrite_data=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToIStructure.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.StructureToIStructure.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToIStructure.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.StructureToIStructure.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>structure</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToIStructure.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert a pymatgen Structure to an immutable IStructure,</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>structure (<cite>pymatgen.core.structure.Structure</cite>): A structure.</dd>
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(<cite>pymatgen.core.structure.IStructure</cite>): An immutable IStructure</dt>
<dd>object.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.StructureToIStructure.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToIStructure.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.conversions.StructureToOxidStructure">
<em class="property">class </em><code class="descclassname">matminer.featurizers.conversions.</code><code class="descname">StructureToOxidStructure</code><span class="sig-paren">(</span><em>target_col_id='structure_oxid'</em>, <em>overwrite_data=False</em>, <em>return_original_on_error=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToOxidStructure" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.conversions.ConversionFeaturizer" title="matminer.featurizers.conversions.ConversionFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.conversions.ConversionFeaturizer</span></code></a></p>
<p>Utility featurizer to add oxidation states to a pymatgen Structure.</p>
<p>Oxidation states are determined using pymatgen’s guessing routines.
The expected input is a <cite>pymatgen.core.structure.Structure</cite> object.</p>
<p>Note that this Featurizer does not produce machine learning-ready features
but instead can be applied to pre-process data or as part of a Pipeline.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>target_col_id (str or None): The column in which the converted data will</dt>
<dd>be written. If the column already exists then an error will be
thrown unless <cite>overwrite_data</cite> is set to <cite>True</cite>. If <cite>target_col_id</cite>
begins with an underscore the data will be written to the column:
<cite>“{}_{}”.format(col_id, target_col_id[1:])</cite>, where <cite>col_id</cite> is the
column being featurized. If <cite>target_col_id</cite> is set to None then
the data will be written “in place” to the <cite>col_id</cite> column (this
will only work if <cite>overwrite_data=True</cite>).</dd>
<dt>overwrite_data (bool): Overwrite any data in <cite>target_column</cite> if it</dt>
<dd>exists.</dd>
<dt>return_original_on_error: If the oxidation states cannot be</dt>
<dd>guessed and set to True, the structure without oxidation states will
be returned. If set to False, an error will be thrown.</dd>
<dt><a href="#id9"><span class="problematic" id="id10">**</span></a>kwargs: Parameters to control the settings for</dt>
<dd><cite>pymatgen.io.structure.Structure.add_oxidation_state_by_guess()</cite>.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.conversions.StructureToOxidStructure.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>target_col_id='structure_oxid'</em>, <em>overwrite_data=False</em>, <em>return_original_on_error=False</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToOxidStructure.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.StructureToOxidStructure.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToOxidStructure.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.StructureToOxidStructure.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>structure</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToOxidStructure.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Add oxidation states to a Structure using pymatgen’s guessing routines.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>structure (<cite>pymatgen.core.structure.Structure</cite>): A structure.</dd>
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(<cite>pymatgen.core.structure.Structure</cite>): A Structure object decorated</dt>
<dd>with oxidation states.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.conversions.StructureToOxidStructure.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.conversions.StructureToOxidStructure.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-matminer.featurizers.deprecated">
<span id="matminer-featurizers-deprecated-module"></span><h2>matminer.featurizers.deprecated module<a class="headerlink" href="#module-matminer.featurizers.deprecated" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="matminer.featurizers.deprecated.CrystalSiteFingerprint">
<em class="property">class </em><code class="descclassname">matminer.featurizers.deprecated.</code><code class="descname">CrystalSiteFingerprint</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.deprecated.CrystalSiteFingerprint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>A local order parameter fingerprint for periodic crystals.</p>
<p>A site fingerprint intended for periodic crystals. The fingerprint represents
the value of various order parameters for the site; each value is the product
two quantities: (i) the value of the order parameter itself and (ii) a factor
that describes how consistent the number of neighbors is with that order
parameter. Note that we can include only factor (ii) using the “wt” order
parameter which is always set to 1. Also note that the cation-anion flag
works only if the structures are oxidation-state decorated (e.g., use
pymatgen’s BVAnalyzer or matminer’s structure_to_oxidstructure()).</p>
<dl class="method">
<dt id="matminer.featurizers.deprecated.CrystalSiteFingerprint.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.deprecated.CrystalSiteFingerprint.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="matminer.featurizers.deprecated.CrystalSiteFingerprint.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.deprecated.CrystalSiteFingerprint.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.deprecated.CrystalSiteFingerprint.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.deprecated.CrystalSiteFingerprint.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.deprecated.CrystalSiteFingerprint.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>struct</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.deprecated.CrystalSiteFingerprint.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get crystal fingerprint of site with given index in input
structure.
Args:</p>
<blockquote>
<div>struct (Structure): Pymatgen Structure object.
idx (int): index of target site in structure.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>list of weighted order parameters of target site.</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.deprecated.CrystalSiteFingerprint.from_preset">
<em class="property">static </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset</em>, <em>cation_anion=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.deprecated.CrystalSiteFingerprint.from_preset" title="Permalink to this definition">¶</a></dt>
<dd><p>Use preset parameters to get the fingerprint
Args:</p>
<blockquote>
<div><p>preset (str): name of preset (“cn” or “ops”)
cation_anion (bool): whether to only consider cation&lt;-&gt;anion bonds</p>
<blockquote>
<div>(bonds with zero charge are also allowed)</div></blockquote>
</div></blockquote>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.deprecated.CrystalSiteFingerprint.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.deprecated.CrystalSiteFingerprint.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-matminer.featurizers.dos">
<span id="matminer-featurizers-dos-module"></span><h2>matminer.featurizers.dos module<a class="headerlink" href="#module-matminer.featurizers.dos" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="matminer.featurizers.dos.DOSFeaturizer">
<em class="property">class </em><code class="descclassname">matminer.featurizers.dos.</code><code class="descname">DOSFeaturizer</code><span class="sig-paren">(</span><em>contributors=1</em>, <em>decay_length=0.1</em>, <em>sampling_resolution=100</em>, <em>gaussian_smear=0.05</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DOSFeaturizer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Significant character and contribution of the density of state from a
CompleteDos, object. Contributors are the atomic orbitals from each site
within the structure. This underlines the importance of dos.structure.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>contributors (int):</dt>
<dd>Sets the number of top contributors to the DOS that are
returned as features. (i.e. contributors=1 will only return the
main cb and main vb orbital)</dd>
<dt>decay_length (float in eV):</dt>
<dd>The dos is sampled by an exponential decay function. this parameter
sets the decay length of the exponential. Three times the decay
length corresponds to 10% sampling strength. There is a hard cutoff
at five times the decay length (1% sampling strength)</dd>
<dt>sampling_resolution (int):</dt>
<dd>Number of points to sample DOS</dd>
<dt>gaussian_smear (float in eV):</dt>
<dd>Gaussian smearing (sigma) around each sampled point in the DOS</dd>
</dl>
</dd>
<dt>Returns (featurize returns [float] and featurize_labels returns [str]):</dt>
<dd><p class="first">xbm_score_i (float): fractions of ith contributor orbital
xbm_location_i (str): fractional coordinate of ith contributor/site
xbm_character_i (str): character of ith contributor (s, p, d, f)
xbm_specie_i (str): elemental specie of ith contributor (ex: ‘Ti’)
xbm_hybridization (int): the amount of hybridization at the band edge</p>
<blockquote class="last">
<div>characterized by an entropy score (x ln x). the hybridization score
is larger for a greater number of significant contributors</div></blockquote>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.dos.DOSFeaturizer.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>contributors=1</em>, <em>decay_length=0.1</em>, <em>sampling_resolution=100</em>, <em>gaussian_smear=0.05</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DOSFeaturizer.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.DOSFeaturizer.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DOSFeaturizer.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns ([str]): list of names of the features. See the docs for the</dt>
<dd>featurize method for more information.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.DOSFeaturizer.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>dos</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DOSFeaturizer.featurize" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>dos (pymatgen CompleteDos or their dict):</dt>
<dd>The density of states to featurize. Must be a complete DOS,
(i.e. contains PDOS and structure, in addition to total DOS)
and must contain the structure.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.DOSFeaturizer.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DOSFeaturizer.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.dos.DopingFermi">
<em class="property">class </em><code class="descclassname">matminer.featurizers.dos.</code><code class="descname">DopingFermi</code><span class="sig-paren">(</span><em>dopings=None</em>, <em>eref='midgap'</em>, <em>T=300</em>, <em>return_eref=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DopingFermi" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>The fermi level (w.r.t. selected reference energy) associated with a
specified carrier concentration (1/cm3) and temperature. This featurizar
requires the total density of states and structure. The Structure
as dos.structure (e.g. in CompleteDos) is required by FermiDos class.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>dopings ([float]): list of doping concentrations 1/cm3. Note that a</dt>
<dd>negative concentration is treated as electron majority carrier
(n-type) and positive for holes (p-type)</dd>
<dt>eref (str or int or float): energy alignment reference. Defaults</dt>
<dd>to midgap (equilibrium fermi). A fixed number can also be used.
str options: “midgap”, “vbm”, “cbm”, “dos_fermi”, “band_center”</dd>
</dl>
<p>T (float): absolute temperature in Kelvin
return_eref: if True, instead of aligning the fermi levels based</p>
<blockquote class="last">
<div>on eref, it (eref) will be explicitly returned as a feature</div></blockquote>
</dd>
<dt>Returns (featurize returns [float] and featurize_labels returns [str]):</dt>
<dd><dl class="first last docutils">
<dt>examples:</dt>
<dd><dl class="first last docutils">
<dt>fermi_c-1e+20T300 (float): the fermi level for the electron</dt>
<dd>concentration of 1e20 and the temperature of 300K.</dd>
<dt>fermi_c1e+18T600 (float): fermi level for the hole concentration</dt>
<dd>of 1e18 and the temperature of 600K.</dd>
<dt>midgap eref (float): if return_eref==True then eref (midgap here)</dt>
<dd>energy is returned. In this case, fermi levels are absolute as
opposed to relative to eref (i.e. if not return_eref)</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.dos.DopingFermi.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>dopings=None</em>, <em>eref='midgap'</em>, <em>T=300</em>, <em>return_eref=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DopingFermi.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.DopingFermi.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DopingFermi.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.DopingFermi.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DopingFermi.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns ([str]): list of names of the features generated by featurize</dt>
<dd>example: “fermi_c-1e+20T300” that is the fermi level for the
electron concentration of 1e20 (c-1e+20) and temperature of 300K.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.DopingFermi.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>dos</em>, <em>bandgap=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DopingFermi.featurize" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">dos (pymatgen Dos, CompleteDos or FermiDos):
bandgap (float): for example the experimentally measured band gap</p>
<blockquote class="last">
<div>or one that is calculated via more accurate methods than the
one used to generate dos. dos will be scissored to have the
same electronic band gap as bandgap.</div></blockquote>
</dd>
<dt>Returns ([float]): features are fermi levels in eV at the given</dt>
<dd>concentrations and temperature + eref in eV if return_eref</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.DopingFermi.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DopingFermi.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.dos.DosAsymmetry">
<em class="property">class </em><code class="descclassname">matminer.featurizers.dos.</code><code class="descname">DosAsymmetry</code><span class="sig-paren">(</span><em>decay_length=0.5</em>, <em>sampling_resolution=100</em>, <em>gaussian_smear=0.05</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DosAsymmetry" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Quantifies the asymmetry of the DOS near the Fermi level.</p>
<p>The DOS asymmetry is defined the natural logarithm of the quotient of the
total DOS above the Fermi level and the total DOS below the Fermi level. A
positive number indicates that there are more states directly above the
Fermi level than below the Fermi level. This featurizer is only meant for
metals and semi-metals.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>decay_length (float in eV):</dt>
<dd>The dos is sampled by an exponential decay function. this parameter
sets the decay length of the exponential. Three times the decay
length corresponds to 10% sampling strength. There is a hard cutoff
at five times the decay length (1% sampling strength)</dd>
<dt>sampling_resolution (int):</dt>
<dd>Number of points to sample DOS</dd>
<dt>gaussian_smear (float in eV):</dt>
<dd>Gaussian smearing (sigma) around each sampled point in the DOS</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.dos.DosAsymmetry.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>decay_length=0.5</em>, <em>sampling_resolution=100</em>, <em>gaussian_smear=0.05</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DosAsymmetry.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.DosAsymmetry.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DosAsymmetry.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the labels for each of the features.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.DosAsymmetry.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>dos</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DosAsymmetry.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculates the DOS asymmetry.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>dos (Dos): A pymatgen Dos object.</dd>
<dt>Returns:</dt>
<dd>A float describing the asymmetry of the DOS.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.DosAsymmetry.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.DosAsymmetry.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.dos.Hybridization">
<em class="property">class </em><code class="descclassname">matminer.featurizers.dos.</code><code class="descname">Hybridization</code><span class="sig-paren">(</span><em>decay_length=0.1</em>, <em>sampling_resolution=100</em>, <em>gaussian_smear=0.05</em>, <em>species=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.Hybridization" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>quantify s/p/d/f orbital character and their hybridizations at band edges</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>decay_length (float in eV):</dt>
<dd>The dos is sampled by an exponential decay function. this parameter
sets the decay length of the exponential. Three times the decay
length corresponds to 10% sampling strength. There is a hard cutoff
at five times the decay length (1% sampling strength)</dd>
<dt>sampling_resolution (int):</dt>
<dd>Number of points to sample DOS</dd>
<dt>gaussian_smear (float in eV):</dt>
<dd>Gaussian smearing (sigma) around each sampled point in the DOS</dd>
<dt>species ([str]): the species for which orbital contributions are</dt>
<dd>separately returned.</dd>
</dl>
</dd>
<dt>Returns (featurize returns [float] and featurize_labels returns [str]):</dt>
<dd><p class="first">set of orbitals contributions and hybridizations. If species, then also
individual contributions from given species. Examples:</p>
<blockquote class="last">
<div><p>cbm_s (float): s-orbital character of the cbm up to energy_cutoff
vbm_sp (float): sp-hybridization at the vbm edge. Minimum is 0</p>
<blockquote>
<div>or no hybridization (e.g. all s or vbm_s==1) and 1.0 is
maximum hybridization (i.e. vbm_s==0.5, vbm_p==0.5)</div></blockquote>
<p>cbm_Si_p (float): p-orbital character of Si</p>
</div></blockquote>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.dos.Hybridization.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>decay_length=0.1</em>, <em>sampling_resolution=100</em>, <em>gaussian_smear=0.05</em>, <em>species=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.Hybridization.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.Hybridization.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.Hybridization.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns ([str]): feature names starting with the extrema (cbm or vbm)
followed by either s,p,d,f orbital to show normalized contribution
or a pair showing their hybridization or contribution of an element.
See the class docs for examples.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.Hybridization.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>dos</em>, <em>decay_length=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.Hybridization.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>takes in the density of state and return the orbitals contributions
and hybridizations.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">dos (pymatgen CompleteDos): note that dos.structure is required
decay_length (float or None): if set, it overrides the instance</p>
<blockquote class="last">
<div>variable self.decay_length.</div></blockquote>
</dd>
</dl>
<p>Returns ([float]): features, see class doc for more info</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.Hybridization.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.Hybridization.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.dos.SiteDOS">
<em class="property">class </em><code class="descclassname">matminer.featurizers.dos.</code><code class="descname">SiteDOS</code><span class="sig-paren">(</span><em>decay_length=0.1</em>, <em>sampling_resolution=100</em>, <em>gaussian_smear=0.05</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.SiteDOS" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>report the fractional s/p/d/f dos for a particular site. a CompleteDos
object is required because knowledge of the structure is needed. this
featurizer will work for metals as well as semiconductors. if the dos is a
semiconductor, cbm and vbm will correspond to the two respective band
edges. if the dos is a metal, then cbm and vbm correspond to above and
below the fermi level, respectively.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>decay_length (float in eV):</dt>
<dd>the dos is sampled by an exponential decay function. this parameter
sets the decay length of the exponential. three times the
decay_length corresponds to 10% sampling strength. there is a hard
cutoff at five times the decay length (1% sampling strength)</dd>
<dt>sampling_resolution (int):</dt>
<dd>number of points to sample dos</dd>
<dt>gaussian_smear (float in eV):</dt>
<dd>Gaussian smearing (sigma) around each sampled point in dos</dd>
</dl>
</dd>
<dt>Returns (list of floats):</dt>
<dd><p class="first">cbm_score_i (float): fractional score for i in {s,p,d,f}
cbm_score_total (float): the total sum of all the {s,p,d,f} scores</p>
<blockquote>
<div>this is useful information when comparing the relative
contributions from multiples sites</div></blockquote>
<p>vbm_score_i (float): fractional score for i in {s,p,d,f}
vbm_score_total (float): the total sum of all the {s,p,d,f} scores</p>
<blockquote class="last">
<div>this is useful information when comparing the relative
contributions from multiples sites</div></blockquote>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.dos.SiteDOS.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>decay_length=0.1</em>, <em>sampling_resolution=100</em>, <em>gaussian_smear=0.05</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.SiteDOS.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.SiteDOS.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.SiteDOS.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns (list of str): list of names of the features. See the docs for</dt>
<dd>the featurizer class for more information.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.dos.SiteDOS.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>dos</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.SiteDOS.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>get dos scores for given site index</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>dos (pymatgen CompleteDos or their dict):</dt>
<dd>dos to featurize, must contain pdos and structure</dd>
</dl>
<p class="last">idx (int): index of target site in structure.</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="matminer.featurizers.dos.get_cbm_vbm_scores">
<code class="descclassname">matminer.featurizers.dos.</code><code class="descname">get_cbm_vbm_scores</code><span class="sig-paren">(</span><em>dos</em>, <em>decay_length</em>, <em>sampling_resolution</em>, <em>gaussian_smear</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.get_cbm_vbm_scores" title="Permalink to this definition">¶</a></dt>
<dd><p>Quantifies the contribution of all atomic orbitals (s/p/d/f) from all
crystal sites to the conduction band minimum (CBM) and the valence band
maximum (VBM). An exponential decay function is used to sample the DOS.
An example use may be sorting the output based on cbm_score or vbm_score.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>dos (pymatgen CompleteDos or their dict):</dt>
<dd>The density of states to featurize. Must be a complete DOS,
(i.e. contains PDOS and structure, in addition to total DOS)</dd>
<dt>decay_length (float in eV):</dt>
<dd>The dos is sampled by an exponential decay function. this parameter
sets the decay length of the exponential. Three times the decay
length corresponds to 10% sampling strength. There is a hard cutoff
at five times the decay length (1% sampling strength)</dd>
<dt>sampling_resolution (int):</dt>
<dd>Number of points to sample DOS</dd>
<dt>gaussian_smear (float in eV):</dt>
<dd>Gaussian smearing (sigma) around each sampled point in the DOS</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>orbital_scores [(dict)]:</dt>
<dd>A list of how much each orbital contributes to the partial
density of states near the band edge. Dictionary items are:
.. cbm_score: (float) fractional contribution to conduction band
.. vbm_score: (float) fractional contribution to valence band
.. species: (pymatgen Specie) the Specie of the orbital
.. character: (str) is the orbital character s, p, d, or f
.. location: [(float)] fractional coordinates of the orbital</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="matminer.featurizers.dos.get_site_dos_scores">
<code class="descclassname">matminer.featurizers.dos.</code><code class="descname">get_site_dos_scores</code><span class="sig-paren">(</span><em>dos</em>, <em>idx</em>, <em>decay_length</em>, <em>sampling_resolution</em>, <em>gaussian_smear</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.dos.get_site_dos_scores" title="Permalink to this definition">¶</a></dt>
<dd><p>Quantifies the contribution of all atomic orbitals (s/p/d/f) from a
particular crystal site to the conduction band minimum (CBM) and the
valence band maximum (VBM). An exponential decay function is used to sample
the DOS. if the dos is a metal, then CBM and VBM indicate the orbital
scores above and below the fermi energy, respectively.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>dos (pymatgen CompleteDos or their dict):</dt>
<dd>The density of states to featurize. Must be a complete DOS,
(i.e. contains PDOS and structure, in addition to total DOS)</dd>
<dt>decay_length (float in eV):</dt>
<dd>The dos is sampled by an exponential decay function. this parameter
sets the decay length of the exponential. Three times the decay
length corresponds to 10% sampling strength. There is a hard cutoff
at five times the decay length (1% sampling strength)</dd>
<dt>sampling_resolution (int):</dt>
<dd>Number of points to sample DOS</dd>
<dt>gaussian_smear (float in eV):</dt>
<dd>Gaussian smearing (sigma) around each sampled point in the DOS</dd>
<dt>idx (int):</dt>
<dd>site index for which to gather dos s/p/d/f scores</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>orbital_scores (dict):</dt>
<dd><p class="first">a dictionary of the fractional s/p/d/f orbital scores from the
total dos accumulated from that site. dictionary structure:</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>{cbm: {s: (float), …, f: (float), total: (float)},</dt>
<dd>vbm: {s: (float), …, f: (float), total: (float)}}</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

</div>
<div class="section" id="module-matminer.featurizers.function">
<span id="matminer-featurizers-function-module"></span><h2>matminer.featurizers.function module<a class="headerlink" href="#module-matminer.featurizers.function" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="matminer.featurizers.function.FunctionFeaturizer">
<em class="property">class </em><code class="descclassname">matminer.featurizers.function.</code><code class="descname">FunctionFeaturizer</code><span class="sig-paren">(</span><em>expressions=None</em>, <em>multi_feature_depth=1</em>, <em>postprocess=None</em>, <em>combo_function=None</em>, <em>latexify_labels=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.function.FunctionFeaturizer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Features from functions applied to existing features, e.g. “1/x”</p>
<p>This featurizer must be fit either by calling .fit_featurize_dataframe
or by calling .fit followed by featurize_dataframe.</p>
<p>This class featurizes a dataframe according to a set
of expressions representing functions to apply to
existing features. The approach here has uses a sympy-based
parsing of string expressions, rather than explicit
python functions.  The primary reason this has been
done is to provide for better support for book-keeping
(e. g. with feature labels), substitution, and elimination
of symbolic redundancy, which sympy is well-suited for.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>expressions ([str]): list of sympy-parseable expressions</dt>
<dd>representing a function of a single variable x, e. g.
[“1 / x”, “x ** 2”], defaults to the list above</dd>
<dt>multi_feature_depth (int): how many features to include if using</dt>
<dd>multiple fields for functionalization, e. g. 2 will
include pairwise combined features</dd>
<dt>postprocess (function or type): type to cast functional outputs</dt>
<dd>to, if, for example, you want to include the possibility of
complex numbers in your outputs, use postprocess=np.complex,
defaults to float</dd>
<dt>combo_function (function): function to combine multi-features,</dt>
<dd>defaults to np.prod (i.e. cumulative product of expressions),
note that a combo function must cleanly process sympy
expressions and <strong>takes a list of arbitrary length as input</strong>,
other options include np.sum</dd>
<dt>latexify_labels (bool): whether to render labels in latex,</dt>
<dd>defaults to False</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.function.FunctionFeaturizer.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>expressions=None</em>, <em>multi_feature_depth=1</em>, <em>postprocess=None</em>, <em>combo_function=None</em>, <em>latexify_labels=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.function.FunctionFeaturizer.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.function.FunctionFeaturizer.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.function.FunctionFeaturizer.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="matminer.featurizers.function.FunctionFeaturizer.exp_dict">
<code class="descname">exp_dict</code><a class="headerlink" href="#matminer.featurizers.function.FunctionFeaturizer.exp_dict" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates a dictionary of expressions keyed by number of
variables in each expression</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>Dictionary of expressions keyed by number of variables</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.function.FunctionFeaturizer.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.function.FunctionFeaturizer.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Returns:</dt>
<dd>Set of feature labels corresponding to expressions</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.function.FunctionFeaturizer.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>*args</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.function.FunctionFeaturizer.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, essentially iterates over all
of the functions in self.function_list to generate
features for each argument.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt><a href="#id11"><span class="problematic" id="id12">*</span></a>args: list of numbers to generate functional output</dt>
<dd>features</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>list of functional outputs corresponding to input args</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.function.FunctionFeaturizer.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>X</em>, <em>y=None</em>, <em>**fit_kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.function.FunctionFeaturizer.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets the feature labels.  Not intended to be used by a user,
only intended to be invoked as part of featurize_dataframe</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>X (DataFrame or array-like): data to fit to</dd>
<dt>Returns:</dt>
<dd>Set of feature labels corresponding to expressions</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.function.FunctionFeaturizer.generate_string_expressions">
<code class="descname">generate_string_expressions</code><span class="sig-paren">(</span><em>input_variable_names</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.function.FunctionFeaturizer.generate_string_expressions" title="Permalink to this definition">¶</a></dt>
<dd><p>Method to generate string expressions for input strings,
mainly used to generate columns names for featurize_dataframe</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>input_variable_names ([str]): strings corresponding to</dt>
<dd>functional input variable names</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>List of string expressions generated by substitution of
variable names into functions</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.function.FunctionFeaturizer.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.function.FunctionFeaturizer.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="matminer.featurizers.function.generate_expressions_combinations">
<code class="descclassname">matminer.featurizers.function.</code><code class="descname">generate_expressions_combinations</code><span class="sig-paren">(</span><em>expressions</em>, <em>combo_depth=2</em>, <em>combo_function=&lt;function prod&gt;</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.function.generate_expressions_combinations" title="Permalink to this definition">¶</a></dt>
<dd><p>This function takes a list of strings representing functions
of x, converts them to sympy expressions, and combines
them according to the combo_depth parameter.  Also filters
resultant expressions for any redundant ones determined
by sympy expression equivalence.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>expressions (strings): all of the sympy-parseable strings</dt>
<dd>to be converted to expressions and combined, e. g.
[“1 / x”, “x ** 2”], must be functions of x</dd>
</dl>
<p>combo_depth (int): the number of independent variables to consider
combo_function (method): the function which combines the</p>
<blockquote class="last">
<div>the respective expressions provided, defaults to np.prod,
i. e. the cumulative product of the expressions</div></blockquote>
</dd>
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>list of unique non-trivial expressions for featurization</dt>
<dd>of inputs</dd>
</dl>
</dd>
</dl>
</dd></dl>

</div>
<div class="section" id="module-matminer.featurizers.site">
<span id="matminer-featurizers-site-module"></span><h2>matminer.featurizers.site module<a class="headerlink" href="#module-matminer.featurizers.site" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="matminer.featurizers.site.AGNIFingerprints">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">AGNIFingerprints</code><span class="sig-paren">(</span><em>directions=(None</em>, <em>'x'</em>, <em>'y'</em>, <em>'z')</em>, <em>etas=None</em>, <em>cutoff=8</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AGNIFingerprints" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<blockquote>
<div><p>Product integral of RDF and Gaussian window function, from Botu et al.</p>
<p>Integral of the product of the radial distribution function and a
Gaussian window function. Originally used by [Botu <em>et al</em>]
(<a class="reference external" href="http://pubs.acs.org/doi/abs/10.1021/acs.jpcc.6b10908">http://pubs.acs.org/doi/abs/10.1021/acs.jpcc.6b10908</a>) to fit empiricial
potentials. These features come in two forms: atomic fingerprints and
direction-resolved fingerprints.
Atomic fingerprints describe the local environment of an atom and are
computed using the function:
:math:<a href="#id13"><span class="problematic" id="id14">`</span></a>A_i(eta) = sumlimits_{i</p>
</div></blockquote>
<p>e j} e^{-(
rac{r_{ij}}{eta})^2} f(r_{ij})`</p>
<blockquote>
<div>where <img class="math" src="_images/math/df0deb143e5ac127f00bd248ee8001ecae572adc.png" alt="i"/> is the index of the atom, <img class="math" src="_images/math/6b21e0b0899a0d2879d3b8019087fa630bab4ea2.png" alt="j"/> is the index of a neighboring atom, <img class="math" src="_images/math/5635a7c34414599c2452d72430811e816b460335.png" alt="\eta"/> is a scaling function,
<img class="math" src="_images/math/08e21b3be44ad4aac8ed231afc369152e9c8539c.png" alt="r_{ij}"/> is the distance between atoms <img class="math" src="_images/math/df0deb143e5ac127f00bd248ee8001ecae572adc.png" alt="i"/> and <img class="math" src="_images/math/6b21e0b0899a0d2879d3b8019087fa630bab4ea2.png" alt="j"/>, and <img class="math" src="_images/math/3c6c50508e2411873e8aec04b9b0d0b026227dad.png" alt="f(r)"/> is a cutoff function where
:math:<a href="#id15"><span class="problematic" id="id16">`</span></a>f(r) = 0.5[cos(</div></blockquote>
<dl class="docutils">
<dt>rac{pi r_{ij}}{R_c}) + 1]` if <img class="math" src="_images/math/326c6fcc3609b0c2183f6a9e23d4aa1d4b141ea2.png" alt="r &lt; R_c:math:"/> and 0 otherwise.</dt>
<dd>The direction-resolved fingerprints are computed using
:math:<a href="#id17"><span class="problematic" id="id18">`</span></a>V_i^k(eta) = sumlimits_{i</dd>
</dl>
<p>e j} 
rac{r_{ij}^k}{r_{ij}} e^{-(
rac{r_{ij}}{eta})^2} f(r_{ij})`</p>
<blockquote>
<div>where <img class="math" src="_images/math/eda67b6e5103620f15dda4926fbd244c38024373.png" alt="r_{ij}^k"/> is the <img class="math" src="_images/math/3af01b3f850c53aa06a7ef9878392efada5f2e71.png" alt="k^{th}"/> component of <div class="system-message">
<p class="system-message-title">System Message: WARNING/2 (<tt class="docutils">old{r}_i - old{r}_j</tt>)</p>
latex exited with error
[stdout]
This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=latex)
 restricted \write18 enabled.
entering extended mode
(./math.tex
LaTeX2e &lt;2015/01/01&gt;
Babel &lt;3.9l&gt; and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/size12.clo))
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/inputenc.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/utf8x.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/ucs.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/data/uni-global.def))
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsmath.sty
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/amscls/amsthm.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/amssymb.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/amsfonts.sty))
(/usr/local/texlive/2015/texmf-dist/tex/latex/anyfontsize/anyfontsize.sty)
(/usr/local/texlive/2015/texmf-dist/tex/latex/tools/bm.sty) (./math.aux)
(/usr/local/texlive/2015/texmf-dist/tex/latex/ucs/ucsencs.def)
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/umsa.fd)
(/usr/local/texlive/2015/texmf-dist/tex/latex/amsfonts/umsb.fd)

! Package inputenc Error: Keyboard character used is undefined
(inputenc)                in inputencoding `utf8x'.

See the inputenc package documentation for explanation.
Type  H &lt;return&gt;  for immediate help.
 ...                                              
                                                  
l.13 \fontsize{12}{14}\selectfont $^^H
                                      old{r}_i - ^^Hold{r}_j$

! Package inputenc Error: Keyboard character used is undefined
(inputenc)                in inputencoding `utf8x'.

See the inputenc package documentation for explanation.
Type  H &lt;return&gt;  for immediate help.
 ...                                              
                                                  
l.13 ...size{12}{14}\selectfont $^^Hold{r}_i - ^^H
                                                  old{r}_j$
[1] (./math.aux) )
(see the transcript file for additional information)
Output written on math.dvi (1 page, 328 bytes).
Transcript written on math.log.
</div>
.
Parameters:
TODO: Differentiate between different atom types (maybe as another class)</div></blockquote>
<dl class="method">
<dt id="matminer.featurizers.site.AGNIFingerprints.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>directions=(None</em>, <em>'x'</em>, <em>'y'</em>, <em>'z')</em>, <em>etas=None</em>, <em>cutoff=8</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AGNIFingerprints.__init__" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>directions (iterable): List of directions for the fingerprints. Can</dt>
<dd>be one or more of ‘None`, ‘x’, ‘y’, or ‘z’</dd>
</dl>
<p class="last">etas (iterable of floats): List of which window widths to compute
cutoff (float): Cutoff distance (Angstroms)</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AGNIFingerprints.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AGNIFingerprints.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AGNIFingerprints.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AGNIFingerprints.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AGNIFingerprints.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>struct</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AGNIFingerprints.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AGNIFingerprints.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AGNIFingerprints.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.AngularFourierSeries">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">AngularFourierSeries</code><span class="sig-paren">(</span><em>bins</em>, <em>cutoff=10.0</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AngularFourierSeries" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Compute the angular Fourier series (AFS), including both angular and radial info</p>
<p>The AFS is the product of pairwise distance function (g_n, g_n’) between two pairs
of atoms (sharing the common central site) and the cosine of the angle
between the two pairs. The AFS is a 2-dimensional feature (the axes are g_n,
g_n’).</p>
<p>Examples of distance functionals are square functions, Gaussian, trig
functions, and Bessel functions. An example for Gaussian:</p>
<blockquote>
<div>lambda d: exp( -(d - d_n)**2 ), where d_n is the coefficient for g_n</div></blockquote>
<p>See <a class="reference internal" href="matminer.featurizers.utils.html#module-matminer.featurizers.utils.grdf" title="matminer.featurizers.utils.grdf"><code class="xref py py-func docutils literal notranslate"><span class="pre">grdf()</span></code></a> for a full list of available binning functions.</p>
<dl class="docutils">
<dt>There are two preset conditions:</dt>
<dd>gaussian: bin functions are gaussians
histogram: bin functions are rectangular functions</dd>
<dt>Features:</dt>
<dd>AFS ([gn], [gn’]) - Angular Fourier Series between binning functions (g1 and g2)</dd>
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>bins:   ([AbstractPairwise]) a list of binning functions that</dt>
<dd>implement the AbstractPairwise base class</dd>
<dt>cutoff: (float) maximum distance to look for neighbors. The</dt>
<dd>featurizer will run slowly for large distance cutoffs
because of the number of neighbor pairs scales as
the square of the number of neighbors</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.site.AngularFourierSeries.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>bins</em>, <em>cutoff=10.0</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AngularFourierSeries.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AngularFourierSeries.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AngularFourierSeries.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AngularFourierSeries.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AngularFourierSeries.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AngularFourierSeries.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>struct</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AngularFourierSeries.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get AFS of the input structure.
Args:</p>
<blockquote>
<div>struct (Structure): Pymatgen Structure object.
idx (int): index of target site in structure struct.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>Flattened list of AFS values. the list order is:</dt>
<dd>g_n g_n’</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.site.AngularFourierSeries.from_preset">
<em class="property">static </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset</em>, <em>width=0.5</em>, <em>spacing=0.5</em>, <em>cutoff=10</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AngularFourierSeries.from_preset" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Preset bin functions for this featurizer. Example use:</dt>
<dd><div class="first last highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">AFS</span> <span class="o">=</span> <span class="n">AngularFourierSeries</span><span class="o">.</span><span class="n">from_preset</span><span class="p">(</span><span class="s1">&#39;gaussian&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">AFS</span><span class="o">.</span><span class="n">featurize</span><span class="p">(</span><span class="n">struct</span><span class="p">,</span> <span class="n">idx</span><span class="p">)</span>
</pre></div>
</div>
</dd>
<dt>Args:</dt>
<dd>preset (str): shape of bin (either ‘gaussian’ or ‘histogram’)
width (float): bin width. std dev for gaussian, width for histogram
spacing (float): the spacing between bin centers
cutoff (float): maximum distance to look for neighbors</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AngularFourierSeries.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AngularFourierSeries.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.AverageBondAngle">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">AverageBondAngle</code><span class="sig-paren">(</span><em>method</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AverageBondAngle" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Determines the average bond angles of a specific site with
its nearest neighbors using one of pymatgen’s NearNeighbor
classes. Neighbors that are adjacent to each other are stored
and angle between them are computed. ‘Average bond angle’ of
a site is the mean bond angle between all its nearest neighbors.</p>
<dl class="method">
<dt id="matminer.featurizers.site.AverageBondAngle.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>method</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AverageBondAngle.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize featurizer</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>method (NearNeighbor) - subclass under NearNeighbor used to compute nearest</dt>
<dd>neighbors</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AverageBondAngle.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AverageBondAngle.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AverageBondAngle.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AverageBondAngle.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AverageBondAngle.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>strc</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AverageBondAngle.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get average bond length of a site and all its nearest
neighbors.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>strc (Structure): Pymatgen Structure object
idx (int): index of target site in structure object</dd>
<dt>Returns:</dt>
<dd>average bond length (list)</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AverageBondAngle.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AverageBondAngle.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.AverageBondLength">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">AverageBondLength</code><span class="sig-paren">(</span><em>method</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AverageBondLength" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Determines the average bond length between one specific site
and all its nearest neighbors using one of pymatgen’s NearNeighbor
classes. These nearest neighbor calculators return weights related
to the proximity of each neighbor to this site. ‘Average bond
length’ of a site is the weighted average of the distance between
site and all its nearest neighbors.</p>
<dl class="method">
<dt id="matminer.featurizers.site.AverageBondLength.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>method</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AverageBondLength.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize featurizer</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>method (NearNeighbor) - subclass under NearNeighbor used to compute nearest neighbors</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AverageBondLength.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AverageBondLength.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AverageBondLength.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AverageBondLength.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AverageBondLength.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>strc</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AverageBondLength.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get weighted average bond length of a site and all its nearest
neighbors.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>strc (Structure): Pymatgen Structure object
idx (int): index of target site in structure object</dd>
<dt>Returns:</dt>
<dd>average bond length (list)</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.AverageBondLength.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.AverageBondLength.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.BondOrientationalParameter">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">BondOrientationalParameter</code><span class="sig-paren">(</span><em>max_l=10</em>, <em>compute_w=False</em>, <em>compute_w_hat=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.BondOrientationalParameter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Averages of spherical harmonics of local neighbors</p>
<p>Bond Orientational Parameters (BOPs) describe the local environment around an atom by
considering the local symmetry of the bonds as computed using spherical harmonics.
To create descriptors that are invariant to rotating the coordinate system, we use the
average of all spherical harmonics of a certain degree - following the approach of
<a class="reference external" href="https://link.aps.org/doi/10.1103/PhysRevB.28.784">Steinhardt et al.</a>.
We weigh the contributions of each neighbor with the solid angle of the Voronoi tessellation
(see <cite>Mickel et al. &lt;https://aip.scitation.org/doi/abs/10.1063/1.4774084&gt;_</cite> for further
discussion). The weighing scheme makes these descriptors vary smoothly with small distortions
of a crystal structure.</p>
<p>In addition to the average spherical harmonics, this class can also compute the <img class="math" src="_images/math/953bde2ab2fca30897f66185e5b37b73747b8b46.png" alt="W"/> and
<img class="math" src="_images/math/240509feeacaad2b6744f49f69502b84f78f1fef.png" alt="\hat{W}"/> parameters proposed by <a class="reference external" href="https://link.aps.org/doi/10.1103/PhysRevB.28.784">Steinhardt et al.</a>.</p>
<dl class="docutils">
<dt>Attributes:</dt>
<dd>BOOP Q l=&lt;n&gt; - Average spherical harmonic for a certain degree, n.
BOOP W l=&lt;n&gt; - W parameter for a certain degree of spherical harmonic, n.
BOOP What l=&lt;n&gt; - <img class="math" src="_images/math/240509feeacaad2b6744f49f69502b84f78f1fef.png" alt="\hat{W}"/> parameter for a certain degree of spherical harmonic, n.</dd>
<dt>References:</dt>
<dd><a class="reference external" href="https://link.aps.org/doi/10.1103/PhysRevB.28.784">Steinhardt et al., _PRB_ (1983)</a>
<a class="reference external" href="http://link.aps.org/doi/10.1103/PhysRevB.95.144110">Seko et al., _PRB_ (2017)</a></dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.site.BondOrientationalParameter.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>max_l=10</em>, <em>compute_w=False</em>, <em>compute_w_hat=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.BondOrientationalParameter.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize the featurizer</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>max_l (int) - Maximum spherical harmonic to consider
compute_w (bool) - Whether to compute Ws as well
compute_w_hat (bool) - Whether to compute What</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.BondOrientationalParameter.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.BondOrientationalParameter.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.BondOrientationalParameter.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.BondOrientationalParameter.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.BondOrientationalParameter.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>strc</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.BondOrientationalParameter.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.BondOrientationalParameter.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.BondOrientationalParameter.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.ChemEnvSiteFingerprint">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">ChemEnvSiteFingerprint</code><span class="sig-paren">(</span><em>cetypes</em>, <em>strategy</em>, <em>geom_finder</em>, <em>max_csm=8</em>, <em>max_dist_fac=1.41</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemEnvSiteFingerprint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Resemblance of given sites to ideal environments</p>
<p>Site fingerprint computed from pymatgen’s ChemEnv package
that provides resemblance percentages of a given site
to ideal environments.
Args:</p>
<blockquote>
<div><dl class="docutils">
<dt>cetypes ([str]): chemical environments (CEs) to be</dt>
<dd>considered.</dd>
</dl>
<p>strategy (ChemenvStrategy): ChemEnv neighbor-finding strategy.
geom_finder (LocalGeometryFinder): ChemEnv local geometry finder.
max_csm (float): maximum continuous symmetry measure (CSM;</p>
<blockquote>
<div>default of 8 taken from chemenv). Note that any CSM
larger than max_csm will be set to max_csm in order
to avoid negative values (i.e., all features are
constrained to be between 0 and 1).</div></blockquote>
<p>max_dist_fac (float): maximum distance factor (default: 1.41).</p>
</div></blockquote>
<dl class="method">
<dt id="matminer.featurizers.site.ChemEnvSiteFingerprint.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>cetypes</em>, <em>strategy</em>, <em>geom_finder</em>, <em>max_csm=8</em>, <em>max_dist_fac=1.41</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemEnvSiteFingerprint.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.ChemEnvSiteFingerprint.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemEnvSiteFingerprint.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.ChemEnvSiteFingerprint.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemEnvSiteFingerprint.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.ChemEnvSiteFingerprint.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>struct</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemEnvSiteFingerprint.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get ChemEnv fingerprint of site with given index in input
structure.
Args:</p>
<blockquote>
<div>struct (Structure): Pymatgen Structure object.
idx (int): index of target site in structure struct.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(numpy array): resemblance fraction of target site to ideal</dt>
<dd>local environments.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.site.ChemEnvSiteFingerprint.from_preset">
<em class="property">static </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemEnvSiteFingerprint.from_preset" title="Permalink to this definition">¶</a></dt>
<dd><p>Use a standard collection of CE types and
choose your ChemEnv neighbor-finding strategy.
Args:</p>
<blockquote>
<div><dl class="docutils">
<dt>preset (str): preset types (“simple” or</dt>
<dd>“multi_weights”).</dd>
</dl>
</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>ChemEnvSiteFingerprint object from a preset.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.ChemEnvSiteFingerprint.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemEnvSiteFingerprint.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.ChemicalSRO">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">ChemicalSRO</code><span class="sig-paren">(</span><em>nn</em>, <em>includes=None</em>, <em>excludes=None</em>, <em>sort=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemicalSRO" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Chemical short range ordering, deviation of local site and nominal structure compositions</p>
<p>Chemical SRO features to evaluate the deviation
of local chemistry with the nominal composition of the structure.</p>
<p>A local bonding preference is computed using
f_el = N_el/(sum of N_el) - c_el,
where N_el is the number of each element type in the neighbors around
the target site, sum of N_el is the sum of all possible element types
(coordination number), and c_el is the composition of the specific
element in the entire structure.
A positive f_el indicates the “bonding” with the specific element
is favored, at least in the target site;
A negative f_el indicates the “bonding” is not favored, at least
in the target site.</p>
<p>Note that ChemicalSRO is only featurized for elements identified by
“fit” (see following), thus “fit” must be called before “featurize”,
or else an error will be raised.</p>
<dl class="docutils">
<dt>Features:</dt>
<dd><dl class="first last docutils">
<dt>CSRO__[nn method]_[element] - The Chemical SRO of a site computed based</dt>
<dd>on neighbors determined with a certain  NN-detection method for
a certain element.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.site.ChemicalSRO.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>nn</em>, <em>includes=None</em>, <em>excludes=None</em>, <em>sort=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemicalSRO.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize the featurizer</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>nn (NearestNeighbor): instance of one of pymatgen’s NearestNeighbor</dt>
<dd>classes.</dd>
</dl>
<p class="last">includes (array-like or str): elements included to calculate CSRO.
excludes (array-like or str): elements excluded to calculate CSRO.
sort (bool): whether to sort elements by mendeleev number.</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.ChemicalSRO.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemicalSRO.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.ChemicalSRO.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemicalSRO.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.ChemicalSRO.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>struct</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemicalSRO.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get CSRO features of site with given index in input structure.
Args:</p>
<blockquote>
<div>struct (Structure): Pymatgen Structure object.
idx (int): index of target site in structure.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>(list of floats): Chemical SRO features for each element.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.ChemicalSRO.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>X</em>, <em>y=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemicalSRO.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Identify elements to be included in the following featurization,
by intersecting the elements present in the passed structures with
those explicitly included (or excluded) in __init__. Only elements
in the <a href="#id55"><span class="problematic" id="id56">self.el_list_</span></a> will be featurized.
Besides, compositions of the passed structures will also be “stored”
in a dict of <a href="#id57"><span class="problematic" id="id58">self.el_amt_dict_</span></a>, avoiding repeated calculation of
composition when featurizing multiple sites in the same structure.
Args:</p>
<blockquote>
<div><dl class="docutils">
<dt>X (array-like): containing Pymatgen structures and sites, supports</dt>
<dd><p class="first">multiple choices:
-2D array-like object:</p>
<blockquote>
<div><dl class="docutils">
<dt>e.g. [[struct, site], [struct, site], …]</dt>
<dd>np.array([[struct, site], [struct, site], …])</dd>
</dl>
</div></blockquote>
<dl class="last docutils">
<dt>-Pandas dataframe:</dt>
<dd>e.g. df[[‘struct’, ‘site’]]</dd>
</dl>
</dd>
</dl>
<p>y : unused (added for consistency with overridden method signature)</p>
</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>self</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.site.ChemicalSRO.from_preset">
<em class="property">static </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemicalSRO.from_preset" title="Permalink to this definition">¶</a></dt>
<dd><p>Use one of the standard instances of a given NearNeighbor class.
Args:</p>
<blockquote>
<div><dl class="docutils">
<dt>preset (str): preset type (“VoronoiNN”, “JmolNN”,</dt>
<dd>“MiniumDistanceNN”, “MinimumOKeeffeNN”,
or “MinimumVIRENN”).</dd>
</dl>
<p><a href="#id20"><span class="problematic" id="id21">**</span></a>kwargs: allow to pass args to the NearNeighbor class.</p>
</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>ChemicalSRO from a preset.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.ChemicalSRO.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.ChemicalSRO.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.CoordinationNumber">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">CoordinationNumber</code><span class="sig-paren">(</span><em>nn=None</em>, <em>use_weights='none'</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CoordinationNumber" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Number of first nearest neighbors of a site.</p>
<p>Determines the number of nearest neighbors of a site using one of
pymatgen’s NearNeighbor classes. These nearest neighbor calculators
can return weights related to the proximity of each neighbor to this
site. It is possible to take these weights into account to prevent
the coordination number from changing discontinuously with small
perturbations of a structure, either by summing the total weights
or using the normalization method presented by
[Ward et al.](<a class="reference external" href="http://link.aps.org/doi/10.1103/PhysRevB.96.014107">http://link.aps.org/doi/10.1103/PhysRevB.96.014107</a>)</p>
<dl class="docutils">
<dt>Features:</dt>
<dd><dl class="first last docutils">
<dt>CN_[method] - Coordination number computed using a certain method</dt>
<dd>for calculating nearest neighbors.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.site.CoordinationNumber.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>nn=None</em>, <em>use_weights='none'</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CoordinationNumber.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize the featurizer</p>
<blockquote>
<div><dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">nn (NearestNeighbor) - Method used to determine coordination number
use_weights (string) - Method used to account for weights of neighbors:</p>
<blockquote class="last">
<div><p>‘none’ - Do not use weights when computing coordination number
‘sum’ - Use sum of weights as the coordination number
‘effective’ - Compute the ‘effective coordination number’, which</p>
<blockquote>
<div>is computed as :math:<a href="#id22"><span class="problematic" id="id23">`</span></a></div></blockquote>
</div></blockquote>
</dd>
</dl>
</div></blockquote>
<p>rac{(sum_n w_n)^2)}{sum_n w_n^2}`</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.CoordinationNumber.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CoordinationNumber.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.CoordinationNumber.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CoordinationNumber.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.CoordinationNumber.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>struct</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CoordinationNumber.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get coordintion number of site with given index in input
structure.
Args:</p>
<blockquote>
<div>struct (Structure): Pymatgen Structure object.
idx (int): index of target site in structure struct.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>[float] - Coordination number</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.site.CoordinationNumber.from_preset">
<em class="property">static </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CoordinationNumber.from_preset" title="Permalink to this definition">¶</a></dt>
<dd><p>Use one of the standard instances of a given NearNeighbor class.
Args:</p>
<blockquote>
<div><dl class="docutils">
<dt>preset (str): preset type (“VoronoiNN”, “JmolNN”,</dt>
<dd>“MiniumDistanceNN”, “MinimumOKeeffeNN”,
or “MinimumVIRENN”).</dd>
</dl>
<p><a href="#id24"><span class="problematic" id="id25">**</span></a>kwargs: allow to pass args to the NearNeighbor class.</p>
</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>CoordinationNumber from a preset.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.CoordinationNumber.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CoordinationNumber.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.CrystalNNFingerprint">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">CrystalNNFingerprint</code><span class="sig-paren">(</span><em>op_types</em>, <em>chem_info=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CrystalNNFingerprint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>A local order parameter fingerprint for periodic crystals.</p>
<p>The fingerprint represents the value of various order parameters for the
site. The “wt” order parameter describes how consistent a site is with a
certain coordination number. The remaining order parameters are computed
by multiplying the “wt” for that coordination number with the OP value.</p>
<p>The chem_info parameter can be used to also get chemical descriptors that
describe differences in some chemical parameter (e.g., electronegativity)
between the central site and the site neighbors.</p>
<dl class="method">
<dt id="matminer.featurizers.site.CrystalNNFingerprint.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>op_types</em>, <em>chem_info=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CrystalNNFingerprint.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize the CrystalNNFingerprint. Use the from_preset() function to
use default params.
Args:</p>
<blockquote>
<div><dl class="docutils">
<dt>op_types (dict): a dict of coordination number (int) to a list of str</dt>
<dd>representing the order parameter types</dd>
<dt>chem_info (dict): a dict of chemical properties (e.g., atomic mass)</dt>
<dd>to dictionaries that map an element to a value
(e.g., chem_info[“Pauling scale”][“O”] = 3.44)</dd>
</dl>
<p><a href="#id26"><span class="problematic" id="id27">**</span></a>kwargs: other settings to be passed into CrystalNN class</p>
</div></blockquote>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.CrystalNNFingerprint.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CrystalNNFingerprint.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.CrystalNNFingerprint.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CrystalNNFingerprint.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.CrystalNNFingerprint.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>struct</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CrystalNNFingerprint.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get crystal fingerprint of site with given index in input
structure.
Args:</p>
<blockquote>
<div>struct (Structure): Pymatgen Structure object.
idx (int): index of target site in structure.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>list of weighted order parameters of target site.</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.site.CrystalNNFingerprint.from_preset">
<em class="property">static </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CrystalNNFingerprint.from_preset" title="Permalink to this definition">¶</a></dt>
<dd><p>Use preset parameters to get the fingerprint
Args:</p>
<blockquote>
<div>preset (str): name of preset (“cn” or “ops”)
<a href="#id28"><span class="problematic" id="id29">**</span></a>kwargs: other settings to be passed into CrystalNN class</div></blockquote>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.CrystalNNFingerprint.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.CrystalNNFingerprint.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.EwaldSiteEnergy">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">EwaldSiteEnergy</code><span class="sig-paren">(</span><em>accuracy=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.EwaldSiteEnergy" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Compute site energy from Coulombic interactions</p>
<dl class="docutils">
<dt>User notes:</dt>
<dd><ul class="first last simple">
<li>This class uses that <cite>charges that are already-defined for the structure</cite>.</li>
<li>Ewald summations can be expensive. If you evaluating every site in many
large structures, run all of the sites for each structure at the same time.
We cache the Ewald result for the structure that was run last, so looping
over sites and then structures is faster than structures than sites.</li>
</ul>
</dd>
<dt>Features:</dt>
<dd>ewald_site_energy - Energy for the site computed from Coulombic interactions</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.site.EwaldSiteEnergy.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>accuracy=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.EwaldSiteEnergy.__init__" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>accuracy (int): Accuracy of Ewald summation, number of decimal places</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.EwaldSiteEnergy.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.EwaldSiteEnergy.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.EwaldSiteEnergy.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.EwaldSiteEnergy.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.EwaldSiteEnergy.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>strc</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.EwaldSiteEnergy.featurize" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>struct (Structure): Pymatgen Structure object.
idx (int): index of target site in structure.</dd>
<dt>Returns:</dt>
<dd>([float]) - Electrostatic energy of the site</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.EwaldSiteEnergy.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.EwaldSiteEnergy.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.GaussianSymmFunc">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">GaussianSymmFunc</code><span class="sig-paren">(</span><em>etas_g2=None</em>, <em>etas_g4=None</em>, <em>zetas_g4=None</em>, <em>gammas_g4=None</em>, <em>cutoff=6.5</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GaussianSymmFunc" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Gaussian symmetry function features suggested by Behler et al.</p>
<p>The function is based on pair distances and angles, to approximate the functional
dependence of local energies, originally used in the fitting of
machine-learning potentials.
The symmetry functions can be divided to a set of radial functions
(g2 function), and a set of angular functions (g4 function).
The number of symmetry functions returned are based on parameters
of etas_g2, etas_g4, zetas_g4 and gammas_g4.
See the original papers for more details:
“Atom-centered symmetry functions for constructing high-dimensional
neural network potentials”, J Behler, J Chem Phys 134, 074106 (2011).
The cutoff function is taken as the polynomial form (cosine_cutoff)
to give a smoothed truncation.
A Fortran and a different Python version can be found in the code
Amp: Atomistic Machine-learning Package
(<a class="reference external" href="https://bitbucket.org/andrewpeterson/amp">https://bitbucket.org/andrewpeterson/amp</a>).
Args:</p>
<blockquote>
<div><dl class="docutils">
<dt>etas_g2 (list of floats): etas used in radial functions.</dt>
<dd>(default: [0.05, 4., 20., 80.])</dd>
<dt>etas_g4 (list of floats): etas used in angular functions.</dt>
<dd>(default: [0.005])</dd>
<dt>zetas_g4 (list of floats): zetas used in angular functions.</dt>
<dd>(default: [1., 4.])</dd>
<dt>gammas_g4 (list of floats): gammas used in angular functions.</dt>
<dd>(default: [+1., -1.])</dd>
</dl>
<p>cutoff (float): cutoff distance. (default: 6.5)</p>
</div></blockquote>
<dl class="method">
<dt id="matminer.featurizers.site.GaussianSymmFunc.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>etas_g2=None</em>, <em>etas_g4=None</em>, <em>zetas_g4=None</em>, <em>gammas_g4=None</em>, <em>cutoff=6.5</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GaussianSymmFunc.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.GaussianSymmFunc.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GaussianSymmFunc.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.site.GaussianSymmFunc.cosine_cutoff">
<em class="property">static </em><code class="descname">cosine_cutoff</code><span class="sig-paren">(</span><em>rs</em>, <em>cutoff</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GaussianSymmFunc.cosine_cutoff" title="Permalink to this definition">¶</a></dt>
<dd><p>Polynomial cutoff function to give a smoothed truncation of the Gaussian
symmetry functions.
Args:</p>
<blockquote>
<div>rs (ndarray): distances to elements
cutoff (float): cutoff distance.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>(ndarray) cutoff function.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.GaussianSymmFunc.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GaussianSymmFunc.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.GaussianSymmFunc.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>struct</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GaussianSymmFunc.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get Gaussian symmetry function features of site with given index
in input structure.
Args:</p>
<blockquote>
<div>struct (Structure): Pymatgen Structure object.
idx (int): index of target site in structure.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>(list of floats): Gaussian symmetry function features.</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.site.GaussianSymmFunc.g2">
<em class="property">static </em><code class="descname">g2</code><span class="sig-paren">(</span><em>eta</em>, <em>rs</em>, <em>cutoff</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GaussianSymmFunc.g2" title="Permalink to this definition">¶</a></dt>
<dd><p>Gaussian radial symmetry function of the center atom,
given an eta parameter.
Args:</p>
<blockquote>
<div>eta: radial function parameter.
rs: distances from the central atom to each neighbor
cutoff (float): cutoff distance.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>(float) Gaussian radial symmetry function.</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.site.GaussianSymmFunc.g4">
<em class="property">static </em><code class="descname">g4</code><span class="sig-paren">(</span><em>etas</em>, <em>zetas</em>, <em>gammas</em>, <em>neigh_dist</em>, <em>neigh_coords</em>, <em>cutoff</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GaussianSymmFunc.g4" title="Permalink to this definition">¶</a></dt>
<dd><p>Gaussian angular symmetry function of the center atom,
given a set of eta, zeta and gamma parameters.
Args:</p>
<blockquote>
<div><p>eta ([float]): angular function parameters.
zeta ([float]): angular function parameters.
gamma ([float]): angular function parameters.
neigh_coords (list of [floats]): coordinates of neighboring atoms, with respect</p>
<blockquote>
<div>to the central atom</div></blockquote>
<p>cutoff (float): cutoff parameter.</p>
</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>(float) Gaussian angular symmetry function for all combinations of eta, zeta, gamma</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.GaussianSymmFunc.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GaussianSymmFunc.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.GeneralizedRadialDistributionFunction">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">GeneralizedRadialDistributionFunction</code><span class="sig-paren">(</span><em>bins</em>, <em>cutoff=20.0</em>, <em>mode='GRDF'</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GeneralizedRadialDistributionFunction" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Compute the general radial distribution function (GRDF) for a site.</p>
<p>The GRDF is a radial measure of crystal order around a site. There are two
featurizing modes:</p>
<ol class="arabic simple">
<li><dl class="first docutils">
<dt>GRDF: (recommended) - n_bins length vector</dt>
<dd>In GRDF mode, The GRDF is computed by considering all sites around a
central site (i.e., no sites are omitted when computing the GRDF). The
features output from this mode will be vectors with length n_bins.</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt>pairwise GRDF: (advanced users) - n_bins x n_sites matrix</dt>
<dd>In this mode, GRDFs are are still computed around a central site, but
only one other site (and their translational equivalents) are used to
compute a GRDF (e.g. site 1 with site 2 and the translational
equivalents of site 2). This results in a a n_sites x n_bins matrix of
features. Requires <cite>fit</cite> for determining the max number of sites for</dd>
</dl>
</li>
</ol>
<p>The GRDF is a generalization of the partial radial distribution function
(PRDF). In contrast with the PRDF, the bins of the GRDF are not mutually-
exclusive and need not carry a constant weight of 1. The PRDF is a case of
the GRDF when the bins are rectangular functions. Examples of other
functions to use with the GRDF are Gaussian, trig, and Bessel functions.</p>
<p>See <a class="reference internal" href="matminer.featurizers.utils.html#module-matminer.featurizers.utils.grdf" title="matminer.featurizers.utils.grdf"><code class="xref py py-func docutils literal notranslate"><span class="pre">grdf()</span></code></a> for a full list of available binning functions.</p>
<dl class="docutils">
<dt>There are two preset conditions:</dt>
<dd>gaussian: bin functions are gaussians
histogram: bin functions are rectangular functions</dd>
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>bins:   ([AbstractPairwise]) List of pairwise binning functions. Each of these functions</dt>
<dd>must implement the AbstractPairwise class.</dd>
</dl>
<p>cutoff: (float) maximum distance to look for neighbors
mode:   (str) the featurizing mode. supported options are:</p>
<blockquote class="last">
<div>‘GRDF’ and ‘pairwise_GRDF’</div></blockquote>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.site.GeneralizedRadialDistributionFunction.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>bins</em>, <em>cutoff=20.0</em>, <em>mode='GRDF'</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GeneralizedRadialDistributionFunction.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.GeneralizedRadialDistributionFunction.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GeneralizedRadialDistributionFunction.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.GeneralizedRadialDistributionFunction.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GeneralizedRadialDistributionFunction.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.GeneralizedRadialDistributionFunction.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>struct</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GeneralizedRadialDistributionFunction.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get GRDF of the input structure.
Args:</p>
<blockquote>
<div>struct (Structure): Pymatgen Structure object.
idx (int): index of target site in structure struct.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first docutils">
<dt>Flattened list of GRDF values. For each run mode the list order is:</dt>
<dd>GRDF:          bin#
pairwise GRDF: site2# bin#</dd>
</dl>
<p class="last">The site2# corresponds to a pymatgen site index and bin#
corresponds to one of the bin functions</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.GeneralizedRadialDistributionFunction.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>X</em>, <em>y=None</em>, <em>**fit_kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GeneralizedRadialDistributionFunction.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Determine the maximum number of sites in X to assign correct feature
labels</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>X - [list of tuples], training data</dt>
<dd>tuple values should be (struc, idx)</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd>self</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.site.GeneralizedRadialDistributionFunction.from_preset">
<em class="property">static </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset</em>, <em>width=1.0</em>, <em>spacing=1.0</em>, <em>cutoff=10</em>, <em>mode='GRDF'</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GeneralizedRadialDistributionFunction.from_preset" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Preset bin functions for this featurizer. Example use:</dt>
<dd><div class="first last highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">GRDF</span> <span class="o">=</span> <span class="n">GeneralizedRadialDistributionFunction</span><span class="o">.</span><span class="n">from_preset</span><span class="p">(</span><span class="s1">&#39;gaussian&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">GRDF</span><span class="o">.</span><span class="n">featurize</span><span class="p">(</span><span class="n">struct</span><span class="p">,</span> <span class="n">idx</span><span class="p">)</span>
</pre></div>
</div>
</dd>
<dt>Args:</dt>
<dd>preset (str): shape of bin (either ‘gaussian’ or ‘histogram’)
width (float): bin width. std dev for gaussian, width for histogram
spacing (float): the spacing between bin centers
cutoff (float): maximum distance to look for neighbors
mode (str): featurizing mode. either ‘GRDF’ or ‘pairwise_GRDF’</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.GeneralizedRadialDistributionFunction.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.GeneralizedRadialDistributionFunction.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.LocalPropertyDifference">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">LocalPropertyDifference</code><span class="sig-paren">(</span><em>data_source=&lt;matminer.utils.data.MagpieData object&gt;</em>, <em>weight='area'</em>, <em>properties=('Electronegativity'</em>, <em>)</em>, <em>signed=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.LocalPropertyDifference" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<blockquote>
<div><p>Differences in elemental properties between site and its neighboring sites.</p>
<p>Uses the Voronoi tessellation of the structure to determine the
neighbors of the site, and assigns each neighbor (<img class="math" src="_images/math/e11f2701c4a39c7fe543a6c4150b421d50f1c159.png" alt="n"/>) a
weight (<img class="math" src="_images/math/12249dbb3a129598bfef9a4f490147c6a4537213.png" alt="A_n"/>) that corresponds to the area of the facet
on the tessellation corresponding to that neighbor.
The local property difference is then computed by
:math:<a href="#id30"><span class="problematic" id="id31">`</span></a></p>
</div></blockquote>
<dl class="docutils">
<dt>rac{sum_n {A_n <a href="#id49"><span class="problematic" id="id50">|p_n - p_0|</span></a>}}{sum_n {A_n}}`</dt>
<dd><p class="first">where <img class="math" src="_images/math/66b30555c6212f4bfbe96c9a9dfceb59d818aef6.png" alt="p_n"/> is the property (e.g., atomic number) of a neighbor
and <img class="math" src="_images/math/298204ab1b85022412ad261503dcab8bd14fb321.png" alt="p_0"/> is the property of a site. If signed parameter is assigned
True, signed difference of the properties is returned instead of absolute
difference.</p>
<dl class="last docutils">
<dt>Features:</dt>
<dd><ul class="first last simple">
<li><dl class="first docutils">
<dt>“local property difference in [property]” - Weighted average</dt>
<dd>of differences between an elemental property of a site and
that of each of its neighbors, weighted by size of face on
Voronoi tessellation</dd>
</dl>
</li>
</ul>
</dd>
<dt>References:</dt>
<dd><a class="reference external" href="http://link.aps.org/doi/10.1103/PhysRevB.96.014107">Ward et al. _PRB_ 2017</a></dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.site.LocalPropertyDifference.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>data_source=&lt;matminer.utils.data.MagpieData object&gt;</em>, <em>weight='area'</em>, <em>properties=('Electronegativity'</em>, <em>)</em>, <em>signed=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.LocalPropertyDifference.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize the featurizer</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>data_source (AbstractData) - Class from which to retrieve</dt>
<dd>elemental properties</dd>
<dt>weight (str) - What aspect of each voronoi facet to use to</dt>
<dd>weigh each neighbor (see VoronoiNN)</dd>
</dl>
<p>properties ([str]) - List of properties to use (default=[‘Electronegativity’])
signed (bool) - whether to return absolute difference or signed difference of</p>
<blockquote class="last">
<div>properties(default=False (absolute difference))</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.LocalPropertyDifference.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.LocalPropertyDifference.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.LocalPropertyDifference.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.LocalPropertyDifference.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.LocalPropertyDifference.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>strc</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.LocalPropertyDifference.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.site.LocalPropertyDifference.from_preset">
<em class="property">static </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.LocalPropertyDifference.from_preset" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a new LocalPropertyDifference class according to a preset</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>preset (str) - Name of preset</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.LocalPropertyDifference.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.LocalPropertyDifference.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.OPSiteFingerprint">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">OPSiteFingerprint</code><span class="sig-paren">(</span><em>target_motifs=None</em>, <em>dr=0.1</em>, <em>ddr=0.01</em>, <em>ndr=1</em>, <em>dop=0.001</em>, <em>dist_exp=2</em>, <em>zero_ops=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.OPSiteFingerprint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Local structure order parameters computed from a site’s neighbor env.</p>
<p>For each order parameter, we determine
the neighbor shell that complies with the expected
coordination number. For example, we find the 4 nearest
neighbors for the tetrahedral OP, the 6 nearest for the
octahedral OP, and the 8 nearest neighbors for the bcc OP.
If we don’t find such a shell, the OP is either set to zero
or evaluated with the shell of the next largest observed
coordination number.
Args:</p>
<blockquote>
<div><dl class="docutils">
<dt>target_motifs (dict): target op or motif type where keys</dt>
<dd>are corresponding coordination numbers
(e.g., {4: “tetrahedral”}).</dd>
<dt>dr (float): width for binning neighbors in unit of relative</dt>
<dd>distances (= distance/nearest neighbor
distance).  The binning is necessary to make the
neighbor-finding step robust against small numerical
variations in neighbor distances (default: 0.1).</dd>
</dl>
<p>ddr (float): variation of width for finding stable OP values.
ndr (int): number of width variations for each variation direction</p>
<blockquote>
<div>(e.g., ndr = 0 only uses the input dr, whereas
ndr=1 tests dr = dr - ddr, dr, and dr + ddr.</div></blockquote>
<dl class="docutils">
<dt>dop (float): binning width to compute histogram for each OP</dt>
<dd>if ndr &gt; 0.</dd>
<dt>dist_exp (boolean): exponent for distance factor to multiply</dt>
<dd>order parameters with that penalizes (large)
variations in distances in a given motif.
0 will switch the option off
(default: 2).</dd>
<dt>zero_ops (boolean): set an OP to zero if there is no neighbor</dt>
<dd>shell that complies with the expected
coordination number of a given OP
(e.g., CN=4 for tetrahedron;
default: True).</dd>
</dl>
</div></blockquote>
<dl class="method">
<dt id="matminer.featurizers.site.OPSiteFingerprint.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>target_motifs=None</em>, <em>dr=0.1</em>, <em>ddr=0.01</em>, <em>ndr=1</em>, <em>dop=0.001</em>, <em>dist_exp=2</em>, <em>zero_ops=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.OPSiteFingerprint.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.OPSiteFingerprint.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.OPSiteFingerprint.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.OPSiteFingerprint.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.OPSiteFingerprint.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.OPSiteFingerprint.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>struct</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.OPSiteFingerprint.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get OP fingerprint of site with given index in input
structure.
Args:</p>
<blockquote>
<div>struct (Structure): Pymatgen Structure object.
idx (int): index of target site in structure.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>opvals (numpy array): order parameters of target site.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.OPSiteFingerprint.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.OPSiteFingerprint.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.SiteElementalProperty">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">SiteElementalProperty</code><span class="sig-paren">(</span><em>data_source=None</em>, <em>properties=('Number'</em>, <em>)</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.SiteElementalProperty" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Elemental properties of atom on a certain site</p>
<dl class="docutils">
<dt>Features:</dt>
<dd>site [property] - Elemental property for this site</dd>
<dt>References:</dt>
<dd><a class="reference external" href="http://link.aps.org/doi/10.1103/PhysRevB.95.144110">Seko et al., _PRB_ (2017)</a>
<a class="reference external" href="http://dx.doi.org/10.1021/acs.chemmater.7b00156">Schmidt et al., _Chem Mater_. (2017)</a></dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.site.SiteElementalProperty.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>data_source=None</em>, <em>properties=('Number'</em>, <em>)</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.SiteElementalProperty.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize the featurizer</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>data_source (AbstractData): Tool used to look up elemental properties
properties ([string]): List of properties to use for features</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.SiteElementalProperty.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.SiteElementalProperty.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.SiteElementalProperty.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.SiteElementalProperty.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.SiteElementalProperty.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>strc</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.SiteElementalProperty.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.site.SiteElementalProperty.from_preset">
<em class="property">static </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.SiteElementalProperty.from_preset" title="Permalink to this definition">¶</a></dt>
<dd><p>Create the class with pre-defined settings</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>preset (string): Desired preset</dd>
<dt>Returns:</dt>
<dd>SiteElementalProperty initialized with desired settings</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.SiteElementalProperty.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.SiteElementalProperty.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.site.VoronoiFingerprint">
<em class="property">class </em><code class="descclassname">matminer.featurizers.site.</code><code class="descname">VoronoiFingerprint</code><span class="sig-paren">(</span><em>cutoff=6.5</em>, <em>use_symm_weights=False</em>, <em>symm_weights='solid_angle'</em>, <em>stats_vol=None</em>, <em>stats_area=None</em>, <em>stats_dist=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.VoronoiFingerprint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Voronoi tessellation-based features around target site.</p>
<p>Calculate the following sets of features based on Voronoi tessellation
analysis around the target site:
Voronoi indices</p>
<blockquote>
<div>n_i denotes the number of i-edged facets, and i is in the range of 3-10.
e.g.
for bcc lattice, the Voronoi indices are [0,6,0,8,…];
for fcc/hcp lattice, the Voronoi indices are [0,12,0,0,…];
for icosahedra, the Voronoi indices are [0,0,12,0,…];</div></blockquote>
<dl class="docutils">
<dt>i-fold symmetry indices</dt>
<dd><p class="first">computed as n_i/sum(n_i), and i is in the range of 3-10.
reflect the strength of i-fold symmetry in local sites.
e.g.
for bcc lattice, the i-fold symmetry indices are [0,6/14,0,8/14,…]</p>
<blockquote>
<div>indicating both 4-fold and a stronger 6-fold symmetries are present;</div></blockquote>
<dl class="last docutils">
<dt>for fcc/hcp lattice, the i-fold symmetry factors are [0,1,0,0,…],</dt>
<dd>indicating only 4-fold symmetry is present;</dd>
<dt>for icosahedra, the Voronoi indices are [0,0,1,0,…],</dt>
<dd>indicating only 5-fold symmetry is present;</dd>
</dl>
</dd>
<dt>Weighted i-fold symmetry indices</dt>
<dd>if use_weights = True</dd>
<dt>Voronoi volume</dt>
<dd>total volume of the Voronoi polyhedron around the target site</dd>
<dt>Voronoi volume statistics of sub_polyhedra formed by each facet + center</dt>
<dd>stats_vol = [‘mean’, ‘std_dev’, ‘minimum’, ‘maximum’]</dd>
<dt>Voronoi area</dt>
<dd>total area of the Voronoi polyhedron around the target site</dd>
<dt>Voronoi area statistics of the facets</dt>
<dd>stats_area = [‘mean’, ‘std_dev’, ‘minimum’, ‘maximum’]</dd>
<dt>Voronoi nearest-neighboring distance statistics</dt>
<dd>stats_dist = [‘mean’, ‘std_dev’, ‘minimum’, ‘maximum’]</dd>
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>cutoff (float): cutoff distance in determining the potential</dt>
<dd>neighbors for Voronoi tessellation analysis.
(default: 6.5)</dd>
<dt>use_symm_weights(bool): whether to use weights to derive weighted</dt>
<dd>i-fold symmetry indices.</dd>
<dt>symm_weights(str): weights to be used in weighted i-fold symmetry</dt>
<dd>indices.
Supported options: ‘solid_angle’, ‘area’, ‘volume’,
‘face_dist’. (default: ‘solid_angle’)</dd>
</dl>
<p class="last">stats_vol (list of str): volume statistics types.
stats_area (list of str): area statistics types.
stats_dist (list of str): neighboring distance statistics types.</p>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.site.VoronoiFingerprint.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>cutoff=6.5</em>, <em>use_symm_weights=False</em>, <em>symm_weights='solid_angle'</em>, <em>stats_vol=None</em>, <em>stats_area=None</em>, <em>stats_dist=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.VoronoiFingerprint.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.VoronoiFingerprint.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.VoronoiFingerprint.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.VoronoiFingerprint.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.VoronoiFingerprint.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.VoronoiFingerprint.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>struct</em>, <em>idx</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.VoronoiFingerprint.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get Voronoi fingerprints of site with given index in input structure.
Args:</p>
<blockquote>
<div>struct (Structure): Pymatgen Structure object.
idx (int): index of target site in structure.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list of floats): Voronoi fingerprints.</dt>
<dd>-Voronoi indices
-i-fold symmetry indices
-weighted i-fold symmetry indices (if use_symm_weights = True)
-Voronoi volume
-Voronoi volume statistics
-Voronoi area
-Voronoi area statistics
-Voronoi dist statistics</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.site.VoronoiFingerprint.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.site.VoronoiFingerprint.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="attribute">
<dt id="matminer.featurizers.site.get_wigner_coeffs">
<code class="descclassname">matminer.featurizers.site.</code><code class="descname">get_wigner_coeffs</code><a class="headerlink" href="#matminer.featurizers.site.get_wigner_coeffs" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the list of non-zero Wigner 3j triplets</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>l (int): Desired l</dd>
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>List of tuples that contain:</dt>
<dd><ul class="first last simple">
<li>((int)) m coordinates of the triplet</li>
<li>(float) Wigner coefficient</li>
</ul>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

</div>
<div class="section" id="module-matminer.featurizers.structure">
<span id="matminer-featurizers-structure-module"></span><h2>matminer.featurizers.structure module<a class="headerlink" href="#module-matminer.featurizers.structure" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="matminer.featurizers.structure.BagofBonds">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">BagofBonds</code><span class="sig-paren">(</span><em>coulomb_matrix=SineCoulombMatrix(diag_elems=True</em>, <em>flatten=False)</em>, <em>token=' - '</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BagofBonds" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Compute a Bag of Bonds vector, as first described by Hansen et al. (2015).</p>
<p>The Bag of Bonds approach is based creating an even-length vector from a
Coulomb matrix output. Practically, it represents the Coloumbic interactions
between each possible set of sites in a structure as a vector.</p>
<p>BagofBonds must be fit to an iterable of structures using the “fit” method
before featurization can occur. This is because the bags and the maximum
lengths of each bag must be set prior to featurization. We recommend
fitting and featurizing on the same data to maintain consistency
between generated feature sets. This can be done using the fit_transform
method (for lists of structures) or the fit_featurize_dataframe method
(for dataframes).</p>
<p>BagofBonds is based on a method by Hansen et. al “Machine Learning
Predictions of Molecular Properties: Accurate Many-Body Potentials and
Nonlocality in Chemical Space” (2015).</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>coulomb_matrix (BaseFeaturizer): A featurizer object containing a</dt>
<dd>“featurize” method which returns a matrix of size nsites x nsites.
Good choices are CoulombMatrix() or SineCoulombMatrix(), with the
flatten=False parameter set.</dd>
<dt>token (str): The string used to separate species in a bond, including</dt>
<dd>spaces. The token must contain at least one space and cannot have
alphabetic characters in it, and should be padded by spaces. For
example, for the bond Cs+ - Cl-, the token is ‘ - ‘. This determines
how bonds are represented in the dataframe.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.BagofBonds.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>coulomb_matrix=SineCoulombMatrix(diag_elems=True</em>, <em>flatten=False)</em>, <em>token=' - '</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BagofBonds.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.BagofBonds.bag">
<code class="descname">bag</code><span class="sig-paren">(</span><em>s</em>, <em>return_baglens=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BagofBonds.bag" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert a structure into a bag of bonds, where each bag has no padded
zeros. using this function will give the ‘raw’ bags, which when
concatenated, will have different lengths.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>s (Structure): A pymatgen Structure or IStructure object. May also</dt>
<dd>work with a</dd>
<dt>return_baglens (bool): If True, returns the bag of bonds with as</dt>
<dd>a dictionary with the number of bonds as values in place
of the vectors of coulomb matrix vals. If False, calculates
Coulomb matrix values and returns ‘raw’ bags.</dd>
</dl>
</dd>
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(dict) A bag of bonds, where the keys are sorted tuples of pymatgen</dt>
<dd>Site objects representing bonds or sites, and the values are the
Coulomb matrix values for that bag.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.BagofBonds.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BagofBonds.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.BagofBonds.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BagofBonds.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.BagofBonds.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BagofBonds.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Featurizes a structure according to the bag of bonds method.
Specifically, each structure is first bagged by flattening the
Coulomb matrix for the structure. Then, it is zero-padded according to
the maximum number of bonds in each bag, for the set of bags that
BagofBonds was fit with.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>s (Structure): A pymatgen structure object</dd>
<dt>Returns:</dt>
<dd>(list): The Bag of Bonds vector for the input structure</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.BagofBonds.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>X</em>, <em>y=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BagofBonds.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Define the bags using a list of structures.</p>
<p>Both the names of the bags (e.g., Cs-Cl) and the maximum lengths of
the bags are set with fit.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>X (Series/list): An iterable of pymatgen Structure</dt>
<dd>objects which will be used to determine the allowed bond
types and bag lengths.</dd>
</dl>
<p class="last">y : unused (added for consistency with overridden method signature)</p>
</dd>
<dt>Returns:</dt>
<dd>self</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.BagofBonds.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BagofBonds.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.BondFractions">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">BondFractions</code><span class="sig-paren">(</span><em>nn=&lt;pymatgen.analysis.local_env.CrystalNN object&gt;</em>, <em>bbv=0</em>, <em>no_oxi=False</em>, <em>approx_bonds=False</em>, <em>token=' - '</em>, <em>allowed_bonds=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BondFractions" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Compute the fraction of each bond in a structure, based on NearestNeighbors.</p>
<p>For example, in a structure with 2 Li-O bonds and 3 Li-P bonds:</p>
<p>Li-0: 0.4
Li-P: 0.6</p>
<p>Features:</p>
<p>BondFractions must be fit with iterable of structures before featurization in
order to define the allowed bond types (features). To do this, pass a list
of allowed_bonds. Otherwise, fit based on a list of structures. If
allowed_bonds is defined and BondFractions is also fit, the intersection
of the two lists of possible bonds is used.</p>
<p>For dataframes containing structures of various compositions, a unified
dataframe is returned which has the collection of all possible bond types
gathered from all structures as columns. To approximate bonds based on
chemical rules (ie, for a structure which you’d like to featurize but has
bonds not in the allowed set), use approx_bonds = True.</p>
<p>BondFractions is based on the “sum over bonds” in the Bag of Bonds approach,
based on a method by Hansen et. al “Machine Learning Predictions of Molecular
Properties: Accurate Many-Body Potentials and Nonlocality in Chemical Space”
(2015).</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>nn (NearestNeighbors): A Pymatgen nearest neighbors derived object. For</dt>
<dd>example, pymatgen.analysis.local_env.VoronoiNN().</dd>
<dt>bbv (float): The ‘bad bond values’, values substituted for</dt>
<dd>structure-bond combinations which can not physically exist, but
exist in the unified dataframe. For example, if a dataframe contains
structures of BaLiP and BaTiO3, determines the value to place in
the Li-P column for the BaTiO3 row; by default, is 0.</dd>
<dt>no_oxi (bool): If True, the featurizer will be agnostic to oxidation</dt>
<dd>states, which prevents oxidation states from  differentiating
bonds. For example, if True, Ca - O is identical to Ca2+ - O2-,
Ca3+ - O-, etc., and all of them will be included in Ca - O column.</dd>
<dt>approx_bonds (bool): If True, approximates the fractions of bonds not</dt>
<dd>in allowed_bonds (forbidden bonds) with similar allowed bonds.
Chemical rules are used to determine which bonds are most ‘similar’;
particularly, the Euclidean distance between the 2-tuples of the
bonds in Mendeleev no. space is minimized for the approximate
bond chosen.</dd>
<dt>token (str): The string used to separate species in a bond, including</dt>
<dd>spaces. The token must contain at least one space and cannot have
alphabetic characters in it, and should be padded by spaces. For
example, for the bond Cs+ - Cl-, the token is ‘ - ‘. This determines
how bonds are represented in the dataframe.</dd>
<dt>allowed_bonds ([str]): A listlike object containing bond types as</dt>
<dd>strings. For example, Cs - Cl, or Li+ - O2-. Ions and elements
will still have distinct bonds if (1) the bonds list originally
contained them and (2) no_oxi is False. These must match the
token specified.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.BondFractions.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>nn=&lt;pymatgen.analysis.local_env.CrystalNN object&gt;</em>, <em>bbv=0</em>, <em>no_oxi=False</em>, <em>approx_bonds=False</em>, <em>token=' - '</em>, <em>allowed_bonds=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BondFractions.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.BondFractions.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BondFractions.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.BondFractions.enumerate_all_bonds">
<code class="descname">enumerate_all_bonds</code><span class="sig-paren">(</span><em>structures</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BondFractions.enumerate_all_bonds" title="Permalink to this definition">¶</a></dt>
<dd><p>Identify all the unique, possible bonds types of all structures present,
and create the ‘unified’ bonds list.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>structures (list/ndarray): List of pymatgen Structures</dd>
<dt>Returns:</dt>
<dd>A tuple of unique, possible bond types for an entire list of
structures. This tuple is used to form the unified feature labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.BondFractions.enumerate_bonds">
<code class="descname">enumerate_bonds</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BondFractions.enumerate_bonds" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists out all the bond possibilities in a single structure.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>s (Structure): A pymatgen structure</dd>
<dt>Returns:</dt>
<dd>A list of bond types in ‘Li-O’ form, where the order of the
elements in each bond type is alphabetic.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.BondFractions.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BondFractions.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the list of allowed bonds. Throws an error if the featurizer
has not been fit.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.BondFractions.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BondFractions.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Quantify the fractions of each bond type in a structure.</p>
<p>For collections of structures, bonds types which are not found in a
particular structure (e.g., Li-P in BaTiO3) are represented as NaN.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>s (Structure): A pymatgen Structure object</dd>
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) The feature list of bond fractions, in the order of the</dt>
<dd>alphabetized corresponding bond names.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.BondFractions.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>X</em>, <em>y=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BondFractions.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Define the bond types allowed to be returned during each featurization.
Bonds found during featurization which are not allowed will be omitted
from the returned dataframe or matrix.</p>
<p>Fit BondFractions by either passing an iterable of structures to
training_data or by defining the bonds explicitly with allowed_bonds
in __init__.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>X (Series/list): An iterable of pymatgen Structure</dt>
<dd>objects which will be used to determine the allowed bond
types.</dd>
</dl>
<p class="last">y : unused (added for consistency with overridden method signature)</p>
</dd>
<dt>Returns:</dt>
<dd>self</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.structure.BondFractions.from_preset">
<em class="property">static </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BondFractions.from_preset" title="Permalink to this definition">¶</a></dt>
<dd><p>Use one of the standard instances of a given NearNeighbor class.
Pass args to __init__, such as allowed_bonds, using this method as well.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>preset (str): preset type (“CrystalNN”, “VoronoiNN”, “JmolNN”,
“MiniumDistanceNN”, “MinimumOKeeffeNN”, or “MinimumVIRENN”).</dd>
<dt>Returns:</dt>
<dd>CoordinationNumber from a preset.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.BondFractions.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.BondFractions.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.CGCNNFeaturizer">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">CGCNNFeaturizer</code><span class="sig-paren">(</span><em>task='classification'</em>, <em>atom_init_fea=None</em>, <em>pretrained_name=None</em>, <em>warm_start_file=None</em>, <em>warm_start_latest=False</em>, <em>save_model_to_dir=None</em>, <em>save_checkpoint_to_dir=None</em>, <em>checkpoint_interval=100</em>, <em>del_checkpoint=True</em>, <em>**cgcnn_kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CGCNNFeaturizer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Features generated by training a Crystal Graph Convolutional Neural Network
(CGCNN) model.</p>
<dl class="docutils">
<dt>This featurizer requires a CGCNN model that can either be:</dt>
<dd><ol class="first last arabic simple">
<li>from a pretrained model, currently only supports the models from
the CGCNN repo (12/10/18): <a class="reference external" href="https://github.com/txie-93/cgcnn">https://github.com/txie-93/cgcnn</a>;</li>
<li>train a CGCNN model based on the X (structures) and y (target) from
fresh start;</li>
<li>similar to 2), but train a model from a warm_start model that can
either be a pretrained model or saved checkpoints.</li>
</ol>
</dd>
</dl>
<p>Please see the fit function for more details.</p>
<p>After obtaining a CGCNN model, we will featurize the structures by taking
the crystal feature vector obtained after pooling as the features.</p>
<p>This featurizer requires installing cgcnn and torch. We wrap and refractor
some of the classes and functions from the original cgcnn to make them
work better for matminer. Please also see utils/cgcnn for more details.</p>
<dl class="docutils">
<dt>Features:</dt>
<dd><ul class="first last simple">
<li>Features for the structures extracted from CGCNN model after pooling.</li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.CGCNNFeaturizer.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>task='classification'</em>, <em>atom_init_fea=None</em>, <em>pretrained_name=None</em>, <em>warm_start_file=None</em>, <em>warm_start_latest=False</em>, <em>save_model_to_dir=None</em>, <em>save_checkpoint_to_dir=None</em>, <em>checkpoint_interval=100</em>, <em>del_checkpoint=True</em>, <em>**cgcnn_kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CGCNNFeaturizer.__init__" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>task (str):</dt>
<dd>Task type, “classification” or “regression”.</dd>
<dt>atom_init_fea (dict):</dt>
<dd>A dict of {atom type: atom feature}. If not provided, will use
the default atom features from the CGCNN repo.</dd>
<dt>pretrained_name (str):</dt>
<dd>CGCNN pretrained model name, if None don’t use pre-trained model</dd>
<dt>warm_start_file (str):</dt>
<dd>The warm start model file, if None, don’t warm start.</dd>
<dt>warm_start_latest(bool):</dt>
<dd>Warm start from the latest model or best model.
This is set because we customize our checkpoints to contain both
best model and latest model. And if the warm start model does
not contain these two options, will just use the static_dict
given in the model/checkpoints to warm start.</dd>
<dt>save_model_to_dir (str):</dt>
<dd>Whether to save the best model to disk, if None, don’t save,
otherwise, save the best model to ‘save_model_to_dir’ path.</dd>
<dt>save_checkpoint_to_dir (str):</dt>
<dd>Whether to save checkpoint during training, if None, don’t save,
otherwise, save the it to ‘save_checkpoint_to_dir’ path.</dd>
<dt>checkpoint_interval (int):</dt>
<dd>Save checkpoint every n epochs if save_checkpoint_to_dir is not
None. If the epochs is less than this checkpoint_interval, will
reset the checkpoint_interval as int(epochs/2).</dd>
<dt>del_checkpoint (bool):</dt>
<dd>Whether to delete checkpoints if training ends successfully.</dd>
<dt><a href="#id33"><span class="problematic" id="id34">**</span></a>cgcnn_kwargs (optional): settings of CGCNN, containing:</dt>
<dd><dl class="first docutils">
<dt>CrystalGraphConvNet model kwargs:</dt>
<dd><dl class="first docutils">
<dt>-atom_fea_len (int): Number of hidden atom features in conv</dt>
<dd>layers, default 64.</dd>
</dl>
<p>-n_conv (int): Number of conv layers, default 3.
-h_fea_len (int): Number of hidden features after pooling,</p>
<blockquote>
<div>default 128.</div></blockquote>
<p>-n_epochs (int): Number of total epochs to run, default 30.
-print_freq (bool): Print frequency, default 10.
-test (bool): Whether to save test predictions
-task (str): “classification” or “regression”,</p>
<blockquote class="last">
<div>default “classification”.</div></blockquote>
</dd>
<dt>Dataset (CIFDataWrapper) kwargs:</dt>
<dd><dl class="first last docutils">
<dt>-max_num_nbr (int): The maximum number of neighbors while</dt>
<dd>constructing the crystal graph, default 12</dd>
<dt>-radius (float): The cutoff radius for searching neighbors,</dt>
<dd>default 8</dd>
<dt>-dmin (float): The minimum distance for constructing</dt>
<dd>GaussianDistance, default 0</dd>
<dt>-step (float): The step size for constructing</dt>
<dd>GaussianDistance, default 0.2</dd>
<dt>-random_seed (int): Random seed for shuffling the dataset,</dt>
<dd>default 123</dd>
</dl>
</dd>
<dt>DataLoader kwargs:</dt>
<dd><p class="first">batch_size (int): Mini-batch size, default 256
num_workers (int): Number of data loading workers, default 0
train_size (int): Number of training data to be loaded,</p>
<blockquote>
<div>default none</div></blockquote>
<dl class="last docutils">
<dt>val_size (int): Number of validation data to be loaded,</dt>
<dd>default 1000</dd>
<dt>test_size (int): Number of test data to be loaded,</dt>
<dd>default 1000</dd>
<dt>“return_test” (bool): Whether to return the test dataset</dt>
<dd>loader. default True</dd>
</dl>
</dd>
<dt>Optimizer kwargs:</dt>
<dd><dl class="first docutils">
<dt>-optim (str): Choose an optimizer, “SGD” or “Adam”,</dt>
<dd>default “SGD”.</dd>
</dl>
<p class="last">-lr (float): Initial learning rate, default 0.01
-momentum (float): Momentum, default 0.9
-weight_decay (float): Weight decay (default: 0)</p>
</dd>
<dt>Scheduler MultiStepLR kwargs:</dt>
<dd><dl class="first last docutils">
<dt>-gamma (float): Multiplicative factor of learning rate</dt>
<dd>decay, default: 0.1.</dd>
<dt>-lr_milestones (list): List of epoch indices.</dt>
<dd>Must be increasing.</dd>
</dl>
</dd>
</dl>
<p class="last">These input cgcnn_kwargs will be processed and grouped in
_initialize_kwargs.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.CGCNNFeaturizer.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CGCNNFeaturizer.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.CGCNNFeaturizer.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CGCNNFeaturizer.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.CGCNNFeaturizer.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>strc</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CGCNNFeaturizer.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the feature vector after pooling layer of the CGCNN model obtained
from fit.
Args:</p>
<blockquote>
<div>strc (Structure): Structure object</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>Features extracted after the pooling layer in CGCNN model</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.CGCNNFeaturizer.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>X</em>, <em>y</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CGCNNFeaturizer.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Get a CGCNN model that can either be:
1) from a pretrained model, currently only supports the models from</p>
<blockquote>
<div>the CGCNN repo;</div></blockquote>
<ol class="arabic simple" start="2">
<li>train a CGCNN model based on the X (structures) and y (target) from
fresh start;</li>
<li>similar to 2), but train a model from a warm_start model that can
either be a pretrained model or saved checkpoints.</li>
</ol>
<p>Note that to use CGCNNFeaturizer, a target y is needed!
Args:</p>
<blockquote>
<div><dl class="docutils">
<dt>X (Series/list):</dt>
<dd>An iterable of pymatgen Structure objects.</dd>
<dt>y (Series/list):</dt>
<dd>Target property that CGCNN is designed to predict.</dd>
</dl>
</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>self</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.CGCNNFeaturizer.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CGCNNFeaturizer.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="matminer.featurizers.structure.CGCNNFeaturizer.latest_model">
<code class="descname">latest_model</code><a class="headerlink" href="#matminer.featurizers.structure.CGCNNFeaturizer.latest_model" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the latest model</p>
</dd></dl>

<dl class="attribute">
<dt id="matminer.featurizers.structure.CGCNNFeaturizer.model">
<code class="descname">model</code><a class="headerlink" href="#matminer.featurizers.structure.CGCNNFeaturizer.model" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the best model</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.ChemicalOrdering">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">ChemicalOrdering</code><span class="sig-paren">(</span><em>shells=(1</em>, <em>2</em>, <em>3)</em>, <em>weight='area'</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.ChemicalOrdering" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<blockquote>
<div><p>How much the ordering of species in the structure differs from random</p>
<p>These parameters describe how much the ordering of all species in a
structure deviates from random using a Warren-Cowley-like ordering
parameter. The first step of this calculation is to determine the nearest
neighbor shells of each site. Then, for each shell a degree of order for
each type is determined by computing:</p>
<p>:math:<a href="#id35"><span class="problematic" id="id36">`</span></a>lpha (t,s) = 1 -</p>
</div></blockquote>
<p>rac{sum_n w_n delta (t - t_n)}{x_t sum_n w_n}`</p>
<blockquote>
<div><p>where <img class="math" src="_images/math/182c7d0771b253a55441383d191fce92f3d58e02.png" alt="w_n"/> is the weight associated with a certain neighbor,
<img class="math" src="_images/math/2ff684758d53878ad22e0ebaa7f34d709cc1b6a4.png" alt="t_p"/> is the type of the neighbor, and <img class="math" src="_images/math/1b1fd12d69ea533588e033d255888cb6a17cdca6.png" alt="x_t"/> is the fraction
of type t in the structure. For atoms that are randomly dispersed in a
structure, this formula yields 0 for all types. For structures where
each site is surrounded only by atoms of another type, this formula
yields large values of <img class="math" src="_images/math/2fe13d18c90531495ad5a8b7976e2a7bda67ae7e.png" alt="alpha"/>.</p>
<p>The mean absolute value of this parameter across all sites is used
as a feature.</p>
<dl class="docutils">
<dt>Features:</dt>
<dd><dl class="first last docutils">
<dt>mean ordering parameter shell [n] - Mean ordering parameter for</dt>
<dd>atoms in the n&lt;sup&gt;th&lt;/sup&gt; neighbor shell</dd>
</dl>
</dd>
<dt>References:</dt>
<dd><a class="reference external" href="http://link.aps.org/doi/10.1103/PhysRevB.96.024104">Ward et al. _PRB_ 2017</a></dd>
</dl>
</div></blockquote>
<dl class="method">
<dt id="matminer.featurizers.structure.ChemicalOrdering.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>shells=(1</em>, <em>2</em>, <em>3)</em>, <em>weight='area'</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.ChemicalOrdering.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize the featurizer</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>shells ([int]) - Which neighbor shells to evaluate
weight (str) - Attribute used to weigh neighbor contributions</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.ChemicalOrdering.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.ChemicalOrdering.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.ChemicalOrdering.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.ChemicalOrdering.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.ChemicalOrdering.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>strc</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.ChemicalOrdering.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.ChemicalOrdering.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.ChemicalOrdering.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.CoulombMatrix">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">CoulombMatrix</code><span class="sig-paren">(</span><em>diag_elems=True</em>, <em>flatten=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CoulombMatrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>The Coulomb matrix, a representation of nuclear coulombic interaction.</p>
<p>Generate the Coulomb matrix, M, of the input structure (or molecule). The
Coulomb matrix was put forward by Rupp et al. (Phys. Rev. Lett. 108, 058301,
2012) and is defined by off-diagonal elements M_ij = Z_i*Z_j/<a href="#id51"><span class="problematic" id="id52">|R_i-R_j|</span></a> and
diagonal elements 0.5*Z_i^2.4, where Z_i and R_i denote the nuclear charge
and the position of atom i, respectively.</p>
<p>Coulomb Matrix features are flattened (for ML-readiness) by default. Use
fit before featurizing to use flattened features. To return the matrix form,
set flatten=False.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>diag_elems (bool): flag indication whether (True, default) to use</dt>
<dd>the original definition of the diagonal elements; if set to False,
the diagonal elements are set to 0</dd>
<dt>flatten (bool): If True, returns a flattened vector based on eigenvalues</dt>
<dd>of the matrix form. Otherwise, returns a matrix object (single
feature), which will likely need to be processed further.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.CoulombMatrix.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>diag_elems=True</em>, <em>flatten=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CoulombMatrix.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.CoulombMatrix.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CoulombMatrix.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.CoulombMatrix.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CoulombMatrix.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.CoulombMatrix.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CoulombMatrix.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get Coulomb matrix of input structure.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>s: input Structure (or Molecule) object.</dd>
<dt>Returns:</dt>
<dd>m: (Nsites x Nsites matrix) Coulomb matrix.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.CoulombMatrix.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>X</em>, <em>y=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CoulombMatrix.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Fit the Coulomb Matrix to a list of structures.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>X ([Structure]): A list of pymatgen structures.
y : unused (added for consistency with overridden method signature)</dd>
<dt>Returns:</dt>
<dd>self</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.CoulombMatrix.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.CoulombMatrix.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.DensityFeatures">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">DensityFeatures</code><span class="sig-paren">(</span><em>desired_features=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.DensityFeatures" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Calculates density and density-like features</p>
<dl class="docutils">
<dt>Features:</dt>
<dd><ul class="first last simple">
<li>density</li>
<li>volume per atom</li>
<li>(“vpa”), and packing fraction</li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.DensityFeatures.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>desired_features=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.DensityFeatures.__init__" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>desired_features: [str] - choose from “density”, “vpa”,</dt>
<dd>“packing fraction”</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.DensityFeatures.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.DensityFeatures.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.DensityFeatures.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.DensityFeatures.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.DensityFeatures.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.DensityFeatures.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.DensityFeatures.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.DensityFeatures.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.Dimensionality">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">Dimensionality</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.Dimensionality" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Returns dimensionality of structure: 1 means linear chains of atoms OR
isolated atoms/no bonds, 2 means layered, 3 means 3D connected
structure. This feature is sensitive to bond length tables that you use.</p>
<dl class="method">
<dt id="matminer.featurizers.structure.Dimensionality.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.Dimensionality.__init__" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt><a href="#id38"><span class="problematic" id="id39">**</span></a>kwargs: keyword args to pass to get_dimensionality() method of</dt>
<dd>pymatgen.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.Dimensionality.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.Dimensionality.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.Dimensionality.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.Dimensionality.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.Dimensionality.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.Dimensionality.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.Dimensionality.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.Dimensionality.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.ElectronicRadialDistributionFunction">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">ElectronicRadialDistributionFunction</code><span class="sig-paren">(</span><em>cutoff=None</em>, <em>dr=0.05</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.ElectronicRadialDistributionFunction" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Calculate the inherent electronic radial distribution function (ReDF)</p>
<p>The ReDF is defined according to Willighagen et al., Acta Cryst., 2005, B61,
29-36.</p>
<p>The ReDF is a structure-integral RDF (i.e., summed over
all sites) in which the positions of neighboring sites
are weighted by electrostatic interactions inferred
from atomic partial charges. Atomic charges are obtained
from the ValenceIonicRadiusEvaluator class.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>cutoff: (float) distance up to which the ReDF is to be</dt>
<dd>calculated (default: longest diagaonal in
primitive cell).</dd>
</dl>
<p class="last">dr: (float) width of bins (“x”-axis) of ReDF (default: 0.05 A).</p>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.ElectronicRadialDistributionFunction.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>cutoff=None</em>, <em>dr=0.05</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.ElectronicRadialDistributionFunction.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.ElectronicRadialDistributionFunction.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.ElectronicRadialDistributionFunction.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.ElectronicRadialDistributionFunction.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.ElectronicRadialDistributionFunction.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.ElectronicRadialDistributionFunction.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.ElectronicRadialDistributionFunction.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get ReDF of input structure.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>s: input Structure object.</dd>
<dt>Returns: (dict) a copy of the electronic radial distribution</dt>
<dd>functions (ReDF) as a dictionary. The distance list
(“x”-axis values of ReDF) can be accessed via key
‘distances’; the ReDF itself is accessible via key
‘redf’.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.ElectronicRadialDistributionFunction.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.ElectronicRadialDistributionFunction.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.EwaldEnergy">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">EwaldEnergy</code><span class="sig-paren">(</span><em>accuracy=4</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.EwaldEnergy" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Compute the energy from Coulombic interactions.</p>
<p>Note: The energy is computed using _charges already defined for the <a href="#id59"><span class="problematic" id="id60">structure_</span></a>.</p>
<dl class="docutils">
<dt>Features:</dt>
<dd>ewald_energy - Coulomb interaction energy of the structure</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.EwaldEnergy.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>accuracy=4</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.EwaldEnergy.__init__" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>accuracy (int): Accuracy of Ewald summation, number of decimal places</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.EwaldEnergy.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.EwaldEnergy.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.EwaldEnergy.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.EwaldEnergy.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.EwaldEnergy.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>strc</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.EwaldEnergy.featurize" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>(Structure) - Structure being analyzed</dd>
<dt>Returns:</dt>
<dd>([float]) - Electrostatic energy of the structure</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.EwaldEnergy.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.EwaldEnergy.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.GlobalSymmetryFeatures">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">GlobalSymmetryFeatures</code><span class="sig-paren">(</span><em>desired_features=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.GlobalSymmetryFeatures" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Determines symmetry features, e.g. spacegroup number and  crystal system</p>
<dl class="docutils">
<dt>Features:</dt>
<dd><ul class="first last simple">
<li>Spacegroup number</li>
<li>Crystal system (1 of 7)</li>
<li>Centrosymmetry (has inversion symmetry)</li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.GlobalSymmetryFeatures.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>desired_features=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.GlobalSymmetryFeatures.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.GlobalSymmetryFeatures.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.GlobalSymmetryFeatures.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="attribute">
<dt id="matminer.featurizers.structure.GlobalSymmetryFeatures.crystal_idx">
<code class="descname">crystal_idx</code><em class="property"> = {'cubic': 1, 'hexagonal': 2, 'monoclinic': 6, 'orthorhombic': 5, 'tetragonal': 4, 'triclinic': 7, 'trigonal': 3}</em><a class="headerlink" href="#matminer.featurizers.structure.GlobalSymmetryFeatures.crystal_idx" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.GlobalSymmetryFeatures.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.GlobalSymmetryFeatures.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.GlobalSymmetryFeatures.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.GlobalSymmetryFeatures.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.GlobalSymmetryFeatures.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.GlobalSymmetryFeatures.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.JarvisCFID">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">JarvisCFID</code><span class="sig-paren">(</span><em>use_cell=True</em>, <em>use_chem=True</em>, <em>use_chg=True</em>, <em>use_rdf=True</em>, <em>use_adf=True</em>, <em>use_ddf=True</em>, <em>use_nn=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.JarvisCFID" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Classical Force-Field Inspired Descriptors (CFID) from Jarvis-ML.</p>
<p>Chemo-structural descriptors from five different sub-methods,cincluding
pairwise radial, nearest neighbor, bond-angle, dihedral-angle and
core-charge distributions. With all descriptors enabled, there are 1,557
features per structure.</p>
<p>Adapted from the nist/jarvis package hosted at:
<a class="reference external" href="https://github.com/usnistgov/jarvis">https://github.com/usnistgov/jarvis</a></p>
<dl class="docutils">
<dt>Find details at: <a class="reference external" href="https://journals.aps.org/prmaterials/abstract/10.1103/">https://journals.aps.org/prmaterials/abstract/10.1103/</a></dt>
<dd>PhysRevMaterials.2.083801</dd>
<dt>Args/Features:</dt>
<dd><dl class="first docutils">
<dt>use_cell (bool): Use structure cell descriptors (4 features, based</dt>
<dd>on DensityFeatures and log volume per atom).</dd>
</dl>
<p>use_chem (bool): Use chemical composition descriptors (438 features)
use_chg (bool): Use core charge descriptors (378 features)
use_adf (bool): Use angular distribution function (179 features x 2, one</p>
<blockquote>
<div>set of features for each cutoff).</div></blockquote>
<p class="last">use_rdf (bool): Use radial distribution function (100 features)
use_ddf (bool): Use dihedral angle distribution function (179 features)
use_nn (bool): Use nearest neighbors (100 descriptors)</p>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.JarvisCFID.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>use_cell=True</em>, <em>use_chem=True</em>, <em>use_chg=True</em>, <em>use_rdf=True</em>, <em>use_adf=True</em>, <em>use_ddf=True</em>, <em>use_nn=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.JarvisCFID.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.JarvisCFID.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.JarvisCFID.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.JarvisCFID.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.JarvisCFID.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.JarvisCFID.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.JarvisCFID.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get chemo-structural CFID decriptors</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>s: Structure object</dd>
<dt>Returns:</dt>
<dd>(np.ndarray) Final descriptors</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.JarvisCFID.get_chem">
<code class="descname">get_chem</code><span class="sig-paren">(</span><em>element</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.JarvisCFID.get_chem" title="Permalink to this definition">¶</a></dt>
<dd><p>Get chemical descriptors for an element</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>element: element name</dd>
<dt>Returns:</dt>
<dd>arr: descriptor array value</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.JarvisCFID.get_chg">
<code class="descname">get_chg</code><span class="sig-paren">(</span><em>element</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.JarvisCFID.get_chg" title="Permalink to this definition">¶</a></dt>
<dd><p>Get charge descriptors for an element</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>element: element name</dd>
<dt>Returns:</dt>
<dd>arr: descriptor array values</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.JarvisCFID.get_distributions">
<code class="descname">get_distributions</code><span class="sig-paren">(</span><em>structure</em>, <em>c_size=10.0</em>, <em>max_cut=5.0</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.JarvisCFID.get_distributions" title="Permalink to this definition">¶</a></dt>
<dd><p>Get radial and angular distribution functions</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>structure: Structure object
c_size: max. cell size
max_cut: max. bond cut-off for angular distribution</dd>
<dt>Retruns:</dt>
<dd>adfa, adfb, ddf, rdf, bondo
Angular distribution upto first cut-off
Angular distribution upto second cut-off
Dihedral angle distribution upto first cut-off
Radial distribution funcion
Bond order distribution</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.JarvisCFID.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.JarvisCFID.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.MaximumPackingEfficiency">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">MaximumPackingEfficiency</code><a class="headerlink" href="#matminer.featurizers.structure.MaximumPackingEfficiency" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Maximum possible packing efficiency of this structure</p>
<p>Uses a Voronoi tessellation to determine the largest radius each atom
can have before any atoms touches any one of their neighbors. Given the
maximum radius size, this class computes the maximum packing efficiency
of the structure as a feature.</p>
<dl class="docutils">
<dt>Features:</dt>
<dd>max packing efficiency - Maximum possible packing efficiency</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.MaximumPackingEfficiency.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.MaximumPackingEfficiency.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.MaximumPackingEfficiency.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.MaximumPackingEfficiency.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.MaximumPackingEfficiency.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>strc</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.MaximumPackingEfficiency.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.MaximumPackingEfficiency.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.MaximumPackingEfficiency.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.MinimumRelativeDistances">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">MinimumRelativeDistances</code><span class="sig-paren">(</span><em>cutoff=10.0</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.MinimumRelativeDistances" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Determines the relative distance of each site to its closest neighbor.</p>
<p>We use the relative distance,
f_ij = r_ij / (r^atom_i + r^atom_j), as a measure rather than the
absolute distances, r_ij, to account for the fact that different
atoms/species have different sizes.  The function uses the
valence-ionic radius estimator implemented in Pymatgen.
Args:</p>
<blockquote>
<div><dl class="docutils">
<dt>cutoff: (float) (absolute) distance up to which tentative</dt>
<dd>closest neighbors (on the basis of relative distances)
are to be determined.</dd>
</dl>
</div></blockquote>
<dl class="method">
<dt id="matminer.featurizers.structure.MinimumRelativeDistances.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>cutoff=10.0</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.MinimumRelativeDistances.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.MinimumRelativeDistances.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.MinimumRelativeDistances.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.MinimumRelativeDistances.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.MinimumRelativeDistances.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.MinimumRelativeDistances.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em>, <em>cutoff=10.0</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.MinimumRelativeDistances.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get minimum relative distances of all sites of the input structure.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>s: Pymatgen Structure object.</dd>
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>min_rel_dists: (list of floats) list of all minimum relative</dt>
<dd>distances (i.e., for all sites).</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.MinimumRelativeDistances.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.MinimumRelativeDistances.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.OrbitalFieldMatrix">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">OrbitalFieldMatrix</code><span class="sig-paren">(</span><em>period_tag=False</em>, <em>flatten=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.OrbitalFieldMatrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Representation based on the valence shell electrons of neighboring atoms.</p>
<p>Each atom is described by a 32-element vector (or 39-element vector, see
period tag for details) uniquely representing the valence subshell.
A 32x32 (39x39) matrix is formed by multiplying two atomic vectors.
An OFM for an atomic environment is the sum of these matrices for each atom
the center atom coordinates with multiplied by a distance function
(In this case, 1/r times the weight of the coordinating atom in the Voronoi</p>
<blockquote>
<div>Polyhedra method). The OFM of a structure or molecule is the average of the
OFMs for all the sites in the structure.</div></blockquote>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>period_tag (bool): In the original OFM, an element is represented</dt>
<dd>by a vector of length 32, where each element is 1 or 0,
which represents the valence subshell of the element.
With period_tag=True, the vector size is increased
to 39, where the 7 extra elements represent the period
of the element. Note lanthanides are treated as period 6,
actinides as period 7. Default False as in the original paper.</dd>
<dt>flatten (bool): Flatten the avg OFM to a 1024-vector (if period_tag</dt>
<dd>False) or a 1521-vector (if period_tag=True).</dd>
</dl>
</dd>
<dt>…attribute:: size</dt>
<dd>Either 32 or 39, the size of the vectors used to describe elements.</dd>
<dt>Reference:</dt>
<dd><cite>Pham et al. _Sci Tech Adv Mat_. 2017 &lt;http://dx.doi.org/10.1080/14686996.2017.1378060&gt;_</cite></dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.OrbitalFieldMatrix.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>period_tag=False</em>, <em>flatten=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.OrbitalFieldMatrix.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize the featurizer</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>period_tag (bool): In the original OFM, an element is represented</dt>
<dd>by a vector of length 32, where each element is 1 or 0,
which represents the valence subshell of the element.
With period_tag=True, the vector size is increased
to 39, where the 7 extra elements represent the period
of the element. Note lanthanides are treated as period 6,
actinides as period 7. Default False as in the original paper.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.OrbitalFieldMatrix.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.OrbitalFieldMatrix.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.OrbitalFieldMatrix.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.OrbitalFieldMatrix.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.OrbitalFieldMatrix.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.OrbitalFieldMatrix.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a supercell for structure s (to protect sites
from coordinating with themselves), and then finds the mean
of the orbital field matrices of each site to characterize
a structure</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>s (Structure): structure to characterize</dd>
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>mean_ofm (size X size matrix): orbital field matrix</dt>
<dd>characterizing s</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.OrbitalFieldMatrix.get_atom_ofms">
<code class="descname">get_atom_ofms</code><span class="sig-paren">(</span><em>struct</em>, <em>symm=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.OrbitalFieldMatrix.get_atom_ofms" title="Permalink to this definition">¶</a></dt>
<dd><p>Calls get_single_ofm for every site in struct. If symm=True,
get_single_ofm is called for symmetrically distinct sites, and
counts is constructed such that ofms[i] occurs counts[i] times
in the structure</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">struct (Structure): structure for find ofms for
symm (bool): whether to calculate ofm for only symmetrically</p>
<blockquote class="last">
<div>distinct sites</div></blockquote>
</dd>
<dt>Returns:</dt>
<dd><p class="first">ofms ([size X size matrix] X len(struct)): ofms for struct
if symm:</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>ofms ([size X size matrix] X number of symmetrically distinct sites):</dt>
<dd>ofms for struct</dd>
</dl>
<p>counts: number of identical sites for each ofm</p>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.OrbitalFieldMatrix.get_mean_ofm">
<code class="descname">get_mean_ofm</code><span class="sig-paren">(</span><em>ofms</em>, <em>counts</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.OrbitalFieldMatrix.get_mean_ofm" title="Permalink to this definition">¶</a></dt>
<dd><p>Averages a list of ofms, weights by counts</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.OrbitalFieldMatrix.get_ohv">
<code class="descname">get_ohv</code><span class="sig-paren">(</span><em>sp</em>, <em>period_tag</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.OrbitalFieldMatrix.get_ohv" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the “one-hot-vector” for pymatgen Element sp. This 32 or 39-length
vector represents the valence shell of the given element.
Args:</p>
<blockquote>
<div><p>sp (Element): element whose ohv should be returned
period_tag (bool): If true, the vector contains items</p>
<blockquote>
<div>corresponding to the period of the element</div></blockquote>
</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd>my_ohv (numpy array length 39 if period_tag, else 32): ohv for sp</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.OrbitalFieldMatrix.get_single_ofm">
<code class="descname">get_single_ofm</code><span class="sig-paren">(</span><em>site</em>, <em>site_dict</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.OrbitalFieldMatrix.get_single_ofm" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the orbital field matrix for a single chemical environment,
where site is the center atom whose environment is characterized and
site_dict is a dictionary of site : weight, where the weights are the
Voronoi Polyhedra weights of the corresponding coordinating sites.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>site (Site): center atom
site_dict (dict of Site:float): chemical environment</dd>
<dt>Returns:</dt>
<dd>atom_ofm (size X size numpy matrix): ofm for site</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.OrbitalFieldMatrix.get_structure_ofm">
<code class="descname">get_structure_ofm</code><span class="sig-paren">(</span><em>struct</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.OrbitalFieldMatrix.get_structure_ofm" title="Permalink to this definition">¶</a></dt>
<dd><p>Calls get_mean_ofm on the results of get_atom_ofms
to give a size X size matrix characterizing a structure</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.OrbitalFieldMatrix.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.OrbitalFieldMatrix.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.PartialRadialDistributionFunction">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">PartialRadialDistributionFunction</code><span class="sig-paren">(</span><em>cutoff=20.0</em>, <em>bin_size=0.1</em>, <em>include_elems=()</em>, <em>exclude_elems=()</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.PartialRadialDistributionFunction" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Compute the partial radial distribution function (PRDF) of an xtal structure</p>
<p>The PRDF of a crystal structure is the radial distibution function broken
down for each pair of atom types.  The PRDF was proposed as a structural
descriptor by [Schutt <em>et al.</em>]
(<a class="reference external" href="https://journals.aps.org/prb/abstract/10.1103/PhysRevB.89.205118">https://journals.aps.org/prb/abstract/10.1103/PhysRevB.89.205118</a>)</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>cutoff: (float) distance up to which to calculate the RDF.
bin_size: (float) size of each bin of the (discrete) RDF.
include_elems: (list of string), list of elements that must be included in PRDF
exclude_elems: (list of string), list of elmeents that should not be included in PRDF</dd>
<dt>Features:</dt>
<dd><dl class="first last docutils">
<dt>Each feature corresponds to the density of number of bonds</dt>
<dd>for a certain pair of elements at a certain range of
distances. For example, “Al-Al PRDF r=1.00-1.50” corresponds
to the density of Al-Al bonds between 1 and 1.5 distance units
By default, this featurizer generates RDFs for each pair
of elements in the training set.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.PartialRadialDistributionFunction.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>cutoff=20.0</em>, <em>bin_size=0.1</em>, <em>include_elems=()</em>, <em>exclude_elems=()</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.PartialRadialDistributionFunction.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.PartialRadialDistributionFunction.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.PartialRadialDistributionFunction.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.PartialRadialDistributionFunction.compute_prdf">
<code class="descname">compute_prdf</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.PartialRadialDistributionFunction.compute_prdf" title="Permalink to this definition">¶</a></dt>
<dd><p>Compute the PRDF for a structure</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>s: (Structure), structure to be evaluated</dd>
<dt>Returns:</dt>
<dd><p class="first">dist_bins - float, start of each of the bins
prdf - dict, where the keys is a pair of elements (strings),</p>
<blockquote class="last">
<div>and the value is the radial distribution function for those paris of elements</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.PartialRadialDistributionFunction.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.PartialRadialDistributionFunction.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.PartialRadialDistributionFunction.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.PartialRadialDistributionFunction.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get PRDF of the input structure.
Args:</p>
<blockquote>
<div>s: Pymatgen Structure object.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>prdf, dist: (tuple of arrays) the first element is a</dt>
<dd>dictionary where keys are tuples of element
names and values are PRDFs.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.PartialRadialDistributionFunction.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>X</em>, <em>y=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.PartialRadialDistributionFunction.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Define the list of elements to be included in the PRDF. By default,
the PRDF will include all of the elements in <cite>X</cite></p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>X: (numpy array nx1) structures used in the training set. Each entry</dt>
<dd>must be Pymatgen Structure objects.</dd>
</dl>
<p class="last">y: <em>Not used</em>
fit_kwargs: <em>not used</em></p>
</dd>
<dt>Returns:</dt>
<dd>self</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.PartialRadialDistributionFunction.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.PartialRadialDistributionFunction.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.RadialDistributionFunction">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">RadialDistributionFunction</code><span class="sig-paren">(</span><em>cutoff=20.0</em>, <em>bin_size=0.1</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.RadialDistributionFunction" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Calculate the radial distribution function (RDF) of a crystal structure.</p>
<dl class="docutils">
<dt>Features:</dt>
<dd><ul class="first last simple">
<li>Radial distribution function</li>
</ul>
</dd>
<dt>Args:</dt>
<dd>cutoff: (float) distance up to which to calculate the RDF.
bin_size: (float) size of each bin of the (discrete) RDF.</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.RadialDistributionFunction.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>cutoff=20.0</em>, <em>bin_size=0.1</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.RadialDistributionFunction.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.RadialDistributionFunction.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.RadialDistributionFunction.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.RadialDistributionFunction.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.RadialDistributionFunction.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.RadialDistributionFunction.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.RadialDistributionFunction.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Get RDF of the input structure.
Args:</p>
<blockquote>
<div>s (Structure): Pymatgen Structure object.</div></blockquote>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>rdf, dist: (tuple of arrays) the first element is the</dt>
<dd>normalized RDF, whereas the second element is
the inner radius of the RDF bin.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.RadialDistributionFunction.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.RadialDistributionFunction.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.SOAP">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">SOAP</code><span class="sig-paren">(</span><em>r_cut=3.0</em>, <em>n_max=4</em>, <em>l_max=2</em>, <em>**soap_kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SOAP" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Smooth overlap of atomic positions (interface via dscribe).</p>
<p>The smooth overlap of atomic positions descriptors provided by dscribe and
SOAPLite. This implementation uses orthogonalized spherical primitive
gaussian-type orbitals as the radial basis set to reach a fast analytical
solution. Please see the dscribe SOAP documentation for more details.</p>
<p>Based originally on the following publications:</p>
<dl class="docutils">
<dt>“On representing chemical environments, Albert P. Bartók, Risi</dt>
<dd>Kondor, and Gábor Csányi, Phys. Rev. B 87, 184115, (2013),
<a class="reference external" href="https://doi.org/10.1103/PhysRevB.87.184115">https://doi.org/10.1103/PhysRevB.87.184115</a></dd>
<dt>“Comparing molecules and solids across structural and alchemical</dt>
<dd>space”, Sandip De, Albert P. Bartók, Gábor Csányi and Michele Ceriotti,
Phys.  Chem. Chem. Phys. 18, 13754 (2016),
<a class="reference external" href="https://doi.org/10.1039/c6cp00415f">https://doi.org/10.1039/c6cp00415f</a></dd>
</dl>
<p>Implementation (and some documentation) originally based on dscribe:
<a class="reference external" href="https://github.com/SINGROUP/dscribe">https://github.com/SINGROUP/dscribe</a>. Please see their page for the latest
updates.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">r_cut (float): Cutoff radius (&gt;1) for local region, in angstrom.
n_max (int): Number of basis functions to be used.
l_max (int): Number of l’s to be used (spherical harmonic)</p>
<dl class="last docutils">
<dt><a href="#id40"><span class="problematic" id="id41">**</span></a>soap_kwargs: (from dscribe docs)</dt>
<dd><dl class="first docutils">
<dt>periodic (bool): Determines whether the system is considered to</dt>
<dd>be periodic.</dd>
<dt>sigma (float): The standard deviation of the gaussians used to</dt>
<dd>expand the atomic density.</dd>
<dt>rbf (str): The radial basis functions to use. The available</dt>
<dd><dl class="first last docutils">
<dt>options are:</dt>
<dd><ul class="first last simple">
<li><dl class="first docutils">
<dt>“gto”: Spherical gaussian type orbitals defined as</dt>
<dd><img class="math" src="_images/math/de47a77e2e05505f7581a4dcf8ae4f7750fe53ad.png" alt="\phi(r) = \beta r^l e^{-\alpha r^2}"/></dd>
</dl>
</li>
</ul>
</dd>
</dl>
</dd>
<dt>crossover (bool): Default True, if crossover of atomic types</dt>
<dd>should be included in the power spectrum.</dd>
<dt>average (bool): Whether to build an average output for all</dt>
<dd>selected positions. Before averaging the outputs for
individual atoms are normalized.</dd>
</dl>
<p>normalize (bool): Whether to normalize the final output.
sparse (bool): Whether the output should be a sparse matrix or a</p>
<blockquote class="last">
<div>dense numpy array.</div></blockquote>
</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.SOAP.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>r_cut=3.0</em>, <em>n_max=4</em>, <em>l_max=2</em>, <em>**soap_kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SOAP.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SOAP.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SOAP.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SOAP.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SOAP.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SOAP.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SOAP.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SOAP.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>X</em>, <em>y=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SOAP.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Fit the SOAP structure featurizer to a dataframe.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>X ([SiteCollection]): For example, a list of pymatgen Structures.
y : unused (added for consistency with overridden method signature)</dd>
<dt>Returns:</dt>
<dd>self</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SOAP.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SOAP.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.SineCoulombMatrix">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">SineCoulombMatrix</code><span class="sig-paren">(</span><em>diag_elems=True</em>, <em>flatten=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SineCoulombMatrix" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>A variant of the Coulomb matrix developed for periodic crystals.</p>
<p>This function generates a variant of the Coulomb matrix developed
for periodic crystals by Faber et al. (Inter. J. Quantum Chem.
115, 16, 2015). It is identical to the Coulomb matrix, except
that the inverse distance function is replaced by the inverse of a
sin**2 function of the vector between the sites which is periodic
in the dimensions of the structure lattice. See paper for details.</p>
<p>Coulomb Matrix features are flattened (for ML-readiness) by default. Use
fit before featurizing to use flattened features. To return the matrix form,
set flatten=False.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first last docutils">
<dt>diag_elems (bool): flag indication whether (True, default) to use</dt>
<dd>the original definition of the diagonal elements; if set to False,
the diagonal elements are set to 0</dd>
<dt>flatten (bool): If True, returns a flattened vector based on eigenvalues</dt>
<dd>of the matrix form. Otherwise, returns a matrix object (single
feature), which will likely need to be processed further.</dd>
</dl>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.SineCoulombMatrix.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>diag_elems=True</em>, <em>flatten=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SineCoulombMatrix.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SineCoulombMatrix.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SineCoulombMatrix.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SineCoulombMatrix.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SineCoulombMatrix.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SineCoulombMatrix.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SineCoulombMatrix.featurize" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>s (Structure or Molecule): input structure (or molecule)</dd>
<dt>Returns:</dt>
<dd>(Nsites x Nsites matrix) Sine matrix or</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SineCoulombMatrix.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>X</em>, <em>y=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SineCoulombMatrix.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Fit the Sine Coulomb Matrix to a list of structures.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>X ([Structure]): A list of pymatgen structures.
y : unused (added for consistency with overridden method signature)</dd>
<dt>Returns:</dt>
<dd>self</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SineCoulombMatrix.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SineCoulombMatrix.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.SiteStatsFingerprint">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">SiteStatsFingerprint</code><span class="sig-paren">(</span><em>site_featurizer</em>, <em>stats=('mean'</em>, <em>'std_dev')</em>, <em>min_oxi=None</em>, <em>max_oxi=None</em>, <em>covariance=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SiteStatsFingerprint" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Computes statistics of properties across all sites in a structure.</p>
<p>This featurizer first uses a site featurizer class (see site.py for
options) to compute features of each site in a structure, and then computes
features of the entire structure by measuring statistics of each attribute.
Can optionally compute the the statistics of only sites with certain ranges
of oxidation states (e.g., only anions).</p>
<dl class="docutils">
<dt>Features:</dt>
<dd><ul class="first last simple">
<li>Returns each statistic of each site feature</li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.SiteStatsFingerprint.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>site_featurizer</em>, <em>stats=('mean'</em>, <em>'std_dev')</em>, <em>min_oxi=None</em>, <em>max_oxi=None</em>, <em>covariance=False</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SiteStatsFingerprint.__init__" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd><p class="first">site_featurizer (BaseFeaturizer): a site-based featurizer
stats ([str]): list of weighted statistics to compute for each feature.</p>
<blockquote>
<div>If stats is None, a list is returned for each features
that contains the calculated feature for each site in the
structure.
<a href="#id42"><span class="problematic" id="id43">*</span></a>Note for nth mode, stat must be ‘n*_mode’; e.g. stat=‘2nd_mode’</div></blockquote>
<dl class="docutils">
<dt>min_oxi (int): minimum site oxidation state for inclusion (e.g.,</dt>
<dd>zero means metals/cations only)</dd>
</dl>
<p class="last">max_oxi (int): maximum site oxidation state for inclusion
covariance (bool): Whether to compute the covariance of site features</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SiteStatsFingerprint.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SiteStatsFingerprint.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SiteStatsFingerprint.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SiteStatsFingerprint.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SiteStatsFingerprint.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>s</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SiteStatsFingerprint.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="staticmethod">
<dt id="matminer.featurizers.structure.SiteStatsFingerprint.from_preset">
<em class="property">static </em><code class="descname">from_preset</code><span class="sig-paren">(</span><em>preset</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SiteStatsFingerprint.from_preset" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a SiteStatsFingerprint class according to a preset</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>preset (str) - Name of preset
kwargs - Options for SiteStatsFingerprint</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.SiteStatsFingerprint.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.SiteStatsFingerprint.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.StructuralHeterogeneity">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">StructuralHeterogeneity</code><span class="sig-paren">(</span><em>weight='area'</em>, <em>stats=('minimum'</em>, <em>'maximum'</em>, <em>'range'</em>, <em>'mean'</em>, <em>'avg_dev')</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.StructuralHeterogeneity" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Variance in the bond lengths and atomic volumes in a structure</p>
<p>These features are based on several statistics derived from the Voronoi
tessellation of a structure. The first set of features relate to the
variance in the average bond length across all atoms in the structure.
The second relate to the variance of bond lengths between each neighbor
of each atom. The final feature is the variance in Voronoi cell sizes
across the structure.</p>
<p>We define the ‘average bond length’ of a site as the weighted average of
the bond lengths for all neighbors. By default, the weight is the
area of the face between the sites.</p>
<p>The ‘neighbor distance variation’ is defined as the weighted mean absolute
deviation in both length for all neighbors of a particular site. As before,
the weight is according to face area by default. For this statistic, we
divide the mean absolute deviation by the mean neighbor distance for that
site.</p>
<dl class="docutils">
<dt>Features:</dt>
<dd><dl class="first last docutils">
<dt>mean absolute deviation in relative bond length - Mean absolute deviation</dt>
<dd>in the average bond lengths for all sites, divided by the
mean average bond length</dd>
<dt>max relative bond length - Maximum average bond length, divided by the</dt>
<dd>mean average bond length</dd>
<dt>min relative bond length - Minimum average bond length, divided by the</dt>
<dd>mean average bond length</dd>
<dt>[stat] neighbor distance variation - Statistic (e.g., mean) of the</dt>
<dd>neighbor distance variation</dd>
<dt>mean absolute deviation in relative cell size - Mean absolute deviation</dt>
<dd>in the Voronoi cell volume across all sites in the structure.
Divided by the mean Voronoi cell volume.</dd>
</dl>
</dd>
<dt>References:</dt>
<dd><a class="reference external" href="http://link.aps.org/doi/10.1103/PhysRevB.96.024104">Ward et al. _PRB_ 2017</a></dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.StructuralHeterogeneity.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>weight='area'</em>, <em>stats=('minimum'</em>, <em>'maximum'</em>, <em>'range'</em>, <em>'mean'</em>, <em>'avg_dev')</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.StructuralHeterogeneity.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.StructuralHeterogeneity.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.StructuralHeterogeneity.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.StructuralHeterogeneity.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.StructuralHeterogeneity.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.StructuralHeterogeneity.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>strc</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.StructuralHeterogeneity.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.StructuralHeterogeneity.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.StructuralHeterogeneity.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.StructureComposition">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">StructureComposition</code><span class="sig-paren">(</span><em>featurizer=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.StructureComposition" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>Features related to the composition of a structure</p>
<p>This class is just a wrapper that calls a composition-based featurizer
on the composition of a Structure</p>
<dl class="docutils">
<dt>Features:</dt>
<dd><ul class="first last simple">
<li>Depends on the featurizer</li>
</ul>
</dd>
</dl>
<dl class="method">
<dt id="matminer.featurizers.structure.StructureComposition.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>featurizer=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.StructureComposition.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize the featurizer</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>featurizer (BaseFeaturizer) - Composition-based featurizer</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.StructureComposition.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.StructureComposition.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.StructureComposition.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.StructureComposition.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.StructureComposition.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>strc</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.StructureComposition.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.StructureComposition.fit">
<code class="descname">fit</code><span class="sig-paren">(</span><em>X</em>, <em>y=None</em>, <em>**fit_kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.StructureComposition.fit" title="Permalink to this definition">¶</a></dt>
<dd><p>Update the parameters of this featurizer based on available data</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>X - [list of tuples], training data</dd>
<dt>Returns:</dt>
<dd>self</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.StructureComposition.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.StructureComposition.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="matminer.featurizers.structure.XRDPowderPattern">
<em class="property">class </em><code class="descclassname">matminer.featurizers.structure.</code><code class="descname">XRDPowderPattern</code><span class="sig-paren">(</span><em>two_theta_range=(0</em>, <em>127)</em>, <em>bw_method=0.05</em>, <em>pattern_length=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.XRDPowderPattern" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#matminer.featurizers.base.BaseFeaturizer" title="matminer.featurizers.base.BaseFeaturizer"><code class="xref py py-class docutils literal notranslate"><span class="pre">matminer.featurizers.base.BaseFeaturizer</span></code></a></p>
<p>1D array representing powder diffraction of a structure as calculated by
pymatgen. The powder is smeared / normalized according to gaussian_kde.</p>
<dl class="method">
<dt id="matminer.featurizers.structure.XRDPowderPattern.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>two_theta_range=(0</em>, <em>127)</em>, <em>bw_method=0.05</em>, <em>pattern_length=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.XRDPowderPattern.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize the featurizer.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>two_theta_range ([float of length 2]): Tuple for range of</dt>
<dd>two_thetas to calculate in degrees. Defaults to (0, 90). Set to
None if you want all diffracted beams within the limiting
sphere of radius 2 / wavelength.</dd>
</dl>
<p>bw_method (float): how much to smear the XRD pattern
pattern_length (float): length of final array; defaults to one value</p>
<blockquote>
<div>per degree (i.e. two_theta_range + 1)</div></blockquote>
<dl class="last docutils">
<dt><a href="#id45"><span class="problematic" id="id46">**</span></a>kwargs: any other arguments to pass into pymatgen’s XRDCalculator,</dt>
<dd>such as the type of radiation.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.XRDPowderPattern.citations">
<code class="descname">citations</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.XRDPowderPattern.citations" title="Permalink to this definition">¶</a></dt>
<dd><p>Citation(s) and reference(s) for this feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should be a string citation,</dt>
<dd>ideally in BibTeX format.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.XRDPowderPattern.feature_labels">
<code class="descname">feature_labels</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.XRDPowderPattern.feature_labels" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate attribute names.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd>([str]) attribute labels.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.XRDPowderPattern.featurize">
<code class="descname">featurize</code><span class="sig-paren">(</span><em>strc</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.XRDPowderPattern.featurize" title="Permalink to this definition">¶</a></dt>
<dd><p>Main featurizer function, which has to be implemented
in any derived featurizer subclass.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>x: input data to featurize (type depends on featurizer).</dd>
<dt>Returns:</dt>
<dd>(list) one or more features.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="matminer.featurizers.structure.XRDPowderPattern.implementors">
<code class="descname">implementors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#matminer.featurizers.structure.XRDPowderPattern.implementors" title="Permalink to this definition">¶</a></dt>
<dd><p>List of implementors of the feature.</p>
<dl class="docutils">
<dt>Returns:</dt>
<dd><dl class="first last docutils">
<dt>(list) each element should either be a string with author name (e.g.,</dt>
<dd>“Anubhav Jain”) or a dictionary  with required key “name” and other
keys like “email” or “institution” (e.g., {“name”: “Anubhav
Jain”, “email”: “<a class="reference external" href="mailto:ajain&#37;&#52;&#48;lbl&#46;gov">ajain<span>&#64;</span>lbl<span>&#46;</span>gov</a>”, “institution”: “LBNL”}).</dd>
</dl>
</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-matminer.featurizers">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-matminer.featurizers" title="Permalink to this headline">¶</a></h2>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">matminer.featurizers package</a><ul>
<li><a class="reference internal" href="#subpackages">Subpackages</a></li>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-matminer.featurizers.bandstructure">matminer.featurizers.bandstructure module</a></li>
<li><a class="reference internal" href="#module-matminer.featurizers.base">matminer.featurizers.base module</a></li>
<li><a class="reference internal" href="#module-matminer.featurizers.composition">matminer.featurizers.composition module</a></li>
<li><a class="reference internal" href="#module-matminer.featurizers.conversions">matminer.featurizers.conversions module</a></li>
<li><a class="reference internal" href="#module-matminer.featurizers.deprecated">matminer.featurizers.deprecated module</a></li>
<li><a class="reference internal" href="#module-matminer.featurizers.dos">matminer.featurizers.dos module</a></li>
<li><a class="reference internal" href="#module-matminer.featurizers.function">matminer.featurizers.function module</a></li>
<li><a class="reference internal" href="#module-matminer.featurizers.site">matminer.featurizers.site module</a></li>
<li><a class="reference internal" href="#module-matminer.featurizers.structure">matminer.featurizers.structure module</a></li>
<li><a class="reference internal" href="#module-matminer.featurizers">Module contents</a></li>
</ul>
</li>
</ul>

  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/matminer.featurizers.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">matminer 0.5.4 documentation</a> &#187;</li> 
      </ul>
    </div>

    <div class="footer" role="contentinfo">
        &#169; Copyright 2015, Anubhav Jain.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.2.
    </div>

  </body>
</html>